WordPress.org

Support

Support » How-To and Troubleshooting » Read More not working

Read More not working

  • 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. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi
    Forum Moderator

    @esmi

    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(); ?>`.

    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!

    redthruviolet
    Member

    @redthruviolet

    Thank you!

    You baled me out!!….

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Read More not working’ is closed to new replies.