WordPress.org

Ready to get started?Download WordPress

Forums

Read More not working (4 posts)

  1. sBowers
    Member
    Posted 4 years ago #

    I have a page template (postsOnAPage.php) that shows posts of one category. (It is the index page just filtered). On the homepage (index) page the 'read more' truncates the article and links show correctly. However on the new postsOnAPage.php with the same code it shows the entire post still shows.

    What should I look for to correct this? Is there a perimeter I am missing? Could there be something that is overriding it on the new page?

    I don't have php in school until at least summer. I am trying but I am new. :)

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Pages don't recognise the <--more> tag unless you add some additional code. Just before the start of the Loop, add<?php global $more;?>. Then change <?php the_content();?> to <?php $more = 0;the_content(); ?>`.

  3. sBowers
    Member
    Posted 4 years ago #

    Thank you! Worked the first time.

    I added the <?php global $more;?> before the loop and added
    <?php $more = 0;the_content(__('Read more', 'monochrome')); ?>
    since I am using that theme.

    I may learn this php thing yet!

  4. redthruviolet
    Member
    Posted 3 years ago #

    Thank you!

    You baled me out!!....

Topic Closed

This topic has been closed to new replies.

About this Topic