[英]Wordpress: How do I fix my post class?
I seem to have somehow messed up when wordpress calls the post class. 当wordpress调用post类时,我似乎有点不知所措。 I looked in "Main Index Template" but that just says "
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
我查看了“主索引模板”,但只说了“
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
" So I don't know what to do. <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
“所以我不知道该怎么办。
Do you mean the id's and class name not printing out on the front end? 您是说id和类名没有在前端打印出来吗?
Add an echo like the example below so that the id and class is printed out. 像下面的示例一样添加回显,以便输出id和class。
<div <?php echo post_class() ?> id="post-<?php echo the_ID(); ?>">
You need to give more information but If something has gone wrong because of you editing the files then I would suggest you to replace the file from www.wordpress.org. 您需要提供更多信息,但是如果由于编辑文件而出现问题,那么我建议您替换www.wordpress.org中的文件。
If it is s theme file then replace the theme. 如果是主题文件,则替换主题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.