the_excert and the_content not working
-
Hi guys
I’ve got a really annoying error, and I couldn’t find the answer on google. Can you help?
On my blog I have some posts generated by the feedwordpress plugin, and some that are hand written in the admin panel.
On category or archive pages, everything (like title, permalink, date) works the way it should except for the_excerpt(), which is completely blank. BUT, this is only true for the hand-written posts. the_excerpt() comes up fine for the posts syndicated from feedwordpress. Here’s the applicable code from my archive.php template:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="entry"> <h2 class="storytitle"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> <p class="meta">Posted <?php the_time('l, F jS, Y'); ?> in <?php the_category(' '); ?>.</p> </div> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>
I’m having the exact same problem on the pages for individual posts, and the code in my single.php is the same as above except that the_content(); is used instead of the_excerpt();
Also, everything works fine when I switch to the default theme. That’s why I think its a problem with my theme code.
- The topic ‘the_excert and the_content not working’ is closed to new replies.