Forums

[resolved] Readmore is not work, simply display all content, even if i put read more tag (2 posts)

  1. khiangte
    Member
    Posted 2 years ago #

    These code is from home.php,that will show content of page and below is to show content of post.. the problem is that read more is not work with this code.. even if i put readmore tag.i dont know why.. can anyone help me out please?

    <div class=" div" id="div1" style="display:none;">
    <?php query_posts('pagename=blog'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php the_content('Read More'); ?>

    <?php endwhile; ?>
    <?php else : ?>
    <?php endif; ?>
    <?php wp_reset_query();?>
    </div>

    <div id="recentPost">
    <div class="rpHead"> </div>
    <div id="content" class="alignleft narrowcolumn" role="main">
    <?php query_posts('showposts=1'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <h2 class="entrytitle">" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h2>
    <small>»»<?php the_time('F jS, Y') ?> by <?php the_author() ?></small>

    <div class="entry">
    <?php the_content('Read More'); ?>
    </div>
    </div>
    <?php endwhile; ?>
    <?php else : ?>

    <?php endif; ?>
    <?php wp_reset_query();?>
    </div>
    </div>

  2. s_ha_dum (was apljdi)
    Member
    Posted 2 years ago #

    From the codex...

    The <!--more--> quicktag will not operate and is ignored in Templates, such as single.php, where just one post is displayed.

    Looks to me like that is the problem. Try the global $more; trick further down the codex page.

Topic Closed

This topic has been closed to new replies.

About this Topic