my client's website is not showing any content where the_content() is called, but DOES show the_excerpt()...
anyone have any idea what she's done wrong?
Thanks Much,
GN
my client's website is not showing any content where the_content() is called, but DOES show the_excerpt()...
anyone have any idea what she's done wrong?
Thanks Much,
GN
I learned a lot from this:
http://codex.wordpress.org/Template_Hierarchy
Find out which template produces the view you are looking at and then check if it really uses the_content
index.php usually controls the "frontpage" and single.php the individual posts display.
well, when i change the_content() to the_excerpt() in index.php, the_excerpt() works, so i'm wondering why the_content() is not getting any content...
Crazy!
Did it never work?
Did it change after an update?
Did it change after installing a new plugin?
What happens when you click the post header? Does the post expand to the full post then?
If possible a link would be helpfull.
This is strange. I just noticed I have a similar problem. the_content() works on a single post but not on a page. I added the text "content should be here" in my page.php so I know which template is being used.
Example: http://www.jthemes.com/about
Will report back how I fixed this.
I've found that using echo $post->post_content in place of the_content() shows the content. This is a temporary fix and now I've got to figure out why the_content() and the_excerpt() are not working.
Try calling setup_postdata($post) , as detailed here:
http://codex.wordpress.org/Template_Tags/get_posts
Some post-related data is not available to get_posts by default, such as post content through the_content(), or the numeric ID. This is resolved by calling an internal function setup_postdata(), with the $post array as its argument:
This topic has been closed to new replies.