Forums

[resolved] how to not show "more" if there is not any 'more' to read? (3 posts)

  1. evelester
    Member
    Posted 2 years ago #

    I am currently working on the design of http://sortedsolutionsllc.com/sayit/ and one problem I am having is the "read more" and "continue" tags are showing up even when there is no further content to read. Seems misleading. Is there any php if statements out there for this purpose? I tried searching but couldn't find anything on it with the ways I searched.

    any ideas?

    p.s. ignore the ugliness- it is still in its early stages of design!

  2. jrav001
    Member
    Posted 2 years ago #

    I grabbed this out of a post here a few days ago...I knew it would come in handy. :-)

    <?php if( strpos( $post->post_content , "<!--more-->" ) != false ) { ?>
    <div>
    <a href="<?php the_permalink(); ?>">Read more</a>
    </div>
    <?php } ?>
  3. evelester
    Member
    Posted 2 years ago #

    you rock!!! I know it is a silly little problem but it was bugging me!

    thanks soooo much!!

Topic Closed

This topic has been closed to new replies.

About this Topic