cewyattjr
Member
Posted 8 months ago #
Because I'm setting up a site with a secondary blog, I'm creating up a page template to pull in my blog posts. So I created a page called Blog and a specific template for that page.
Querying posts like so at the top of the page:
query_posts('cat=-5,-3,-7' );
Then the loop:
<?php while (have_posts()) : ?>
<?php the_post(); [extra code removed]
the_content();
<?php endwhile; ?>
I'm finding that on this template, I'm only getting an output of maybe 10 or 20 characters. What gives? Is there a obvious setting that I'm missing? I was under the impression from reading the Codex that the_content() would output all a post??
Thanks!
Chuck
Fumito Mizuno
Member
Posted 8 months ago #
When you use the_content in non-single pages (ex, category archive), you will get the excerpts of your blog posts.
http://codex.wordpress.org/Function_Reference/the_content
http://codex.wordpress.org/Function_Reference/the_excerpt
cewyattjr
Member
Posted 8 months ago #
Aha. OK, thanks Ounziw. I wonder if there's a way to change/trick/hack/workaround that...without resorting to something like
echo $queried_post->post_content
?
Thanks mucho!!
There is a global variable - $more that can control whether the more tag is used. When set to zero, the more tag is used. When set to 1, the tag is ignored.
So, place code like this before calling the_content():
<?php global $more;
$more = 1; // Ignore the more tag
?>