Forums

[resolved] compare full content of post and content before "more" tag. (4 posts)

  1. Rendom
    Member
    Posted 3 years ago #

    I need to know "if my post have more tag then i will show "some div", else if there is no "full post(no "read more")" then dont show "some div"
    i'm not using excerpt.

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    In a loop this should work:

    <?php
    if (strpos($post->post_content, '<!--more-->')) {
    echo 'this post has the more';
    }
    ?>
  3. Rendom
    Member
    Posted 3 years ago #

    This work only with "excerpt". But not with tag "more"(

  4. Rendom
    Member
    Posted 3 years ago #

    Oops, seems everything works! Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic