WordPress.org

Ready to get started?Download WordPress

Forums

Please help me out (2 posts)

  1. khiangte
    Member
    Posted 4 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. knivesOut
    Member
    Posted 4 years ago #

    Your answer may be here
    http://codex.wordpress.org/Customizing_the_Read_More

    Or try using this within your loop
    <a href="<?php the_permalink() ?>">Read More</a>

Topic Closed

This topic has been closed to new replies.

About this Topic