The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Read More not working (4 posts)

  1. sBowers
    Posted 6 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
    Forum Moderator
    Posted 6 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
    Posted 6 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
    Posted 5 years ago #

    Thank you!

    You baled me out!!....

Topic Closed

This topic has been closed to new replies.

About this Topic