简体   繁体   English

WordPress:如何修复我的帖子课?

[英]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.

相关问题 如何修复我的WordPress页面无法正确显示? - How do I fix my WordPress pages not displaying correctly? Wordpress - 如何在我的页面中显示帖子内容 html? - Wordpress - How do I display post content html in my page? 当我尝试在我的 Wordpress 网站上加载页面时,我该如何解决这个错误? - How do I fix this error I get when I try to load pages on my Wordpress site? 如何在 Wordpress 中格式化发布日期? - How do I format the post date in Wordpress? 当我使用 jquery ajax 运行 $.post 时,当我使用 json 参数解码时,我的帖子为空。 我该如何解决? - When I run a $.post with jquery ajax, my Post is empty when I decode with the json parameter. How do I fix that? 如何修复我的代码,以便在按下按钮时它只会增加相应帖子的投票数? - How do I fix my code so that when the button is pressed it will only increment the vote count of the corresponding post? 为什么在ajax发布之后发布我的表单? 我该如何解决? - Why is my form posting after ajax post? How do I fix this? 用PHP / SQL构建的CMS:我的帖子内容全部放在一个空格中,完全没有问题,如何解决? - CMS built with PHP/SQL : My post content is all in one paragrah with no space, how do I fix this? 如何使用单个插件向我的 WordPress 帖子编辑器添加多个按钮? - How do I add multiple buttons to my WordPress post editor with a single plugin? 如何在我的静态html网站上显示来自Wordpress的一篇(精选)帖子? - How do I display one (featured) post from Wordpress on my static html website?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM