Support » Themes and Templates » Query_posts – “Read the rest of this entry” doesn’t show

  • Resolved guzh



    as the topic says. When I call query_posts, the text-link “Read the rest of this entry” doesn’t appear. So whole posts are showing..

    Here is my code:

    <?php query_posts('cat=5'); ?>
      <?php while (have_posts()) : the_post(); ?>
        <div class="post" id="post-<?php the_ID(); ?>">
          <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
         <div class="postmetadata">Posted
         <!-- the date and time -->
         on <?php the_time(get_option('date_format')) ?>, <?php the_time(get_option('time_format')) ?>,
         <!-- post author -->
         by <?php the_author() ?>,
         <!-- post category -->
         under <?php the_category(', ') ?>.
         <div class="entry">
            <?php the_content('Read the rest of this entry &raquo;'); ?>
         <div class="postmetadata">
           <?php if( function_exists('the_tags') )
            the_tags(__('Tags: '), ', ', '');
           <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></div>
      <?php endwhile; ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • is there <!–more–> in your content?
    en,in there is no <!–more–>,wordpress will show whole posts

    I’ve added the <!–more–> -tag..

    The Index-page shows the post correctly. but not this page.
    The only difference between the index.php and this is that I call have_posts (in index) instead of query_posts..

    If the quicktag <!–more–> is used in a post to designate the “cut-off” point for the post to be excerpted, the_content() tag will only show the excerpt up to the <!–more–> quicktag point on non-single/non-permalink post pages

    See if this helps in before loop:

    global $more;
    $more = 0;




    It worked with:

    <?php query_posts('cat=5&orderby=date');
    	   global $more;
    	   $more = 0;


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Query_posts – “Read the rest of this entry” doesn’t show’ is closed to new replies.