admin管理员组文章数量:1389148
I have a WordPress install in which the "post_title" field from the "wp_posts" table is not making it into the WP_Post->post_title variable.
So, for a given post in the wp_posts table that has a correct post_title value of say (retrieved via a direct MySQL query):
"My First Post"
Retrieving the post title via any basic WordPress method, such as:
<?php print the_title(); ?>
... or ...
<?php
$this_post = get_post();
print $this_post->post_title;
?>
Instead of the post's title I get something like:
"Category | Sitename"
(Where "Category" is something like "Articles" and "Sitename" is the site's name)
The resulting string from querying the post's tile is not the contents of the post_title field from the record in the wp_post table, ie. it's NOT the post's title.
I would expect to see the post's title here because the documentation for the WP_Post object (/) states that the post_title member contains the post's title, however it clearly does not, it contains some other value.
I've searched for any references to a filter which might be rewriting the post title, but as of yet can find none.
How is it possible that WordPress might be returning something other than the actual post title when referencing the post title? Where else should I be looking?
本文标签: Post title not displaying as recorded in the wpposts table
版权声明:本文标题:Post title not displaying as recorded in the wp_posts table 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744587716a2614295.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论