• Resolved three-star-dave

    (@three-star-dave)


    Is there a way to display *just* the text that appears after the <!--more-->?

    I can see a way with the_content() to just display what comes before that, but I have a need to programmatically insert something in the post archive between the top content and lower content of the post, and I don’t see a way to actually treat the second half separately.

    In other words, I want something that looks like.

    This is the first half of the text before the More tag.

    Just a reminder, the category of this post is “Blah”

    This is the second half of the text after the More tag. It may be formatted differently, too.

    Any ideas? I’ve poked around in the tags and forum, but don’t see anything.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter three-star-dave

    (@three-star-dave)

    This post ( http://wordpress.org/support/topic/228755 ) shows a way to do this through this:

    $aftermore = 3 + strpos($post->post_content, ‘–>’);
    echo ‘this is after the more >’ . substr($post->post_content,$aftermore);

    But that doesn’t account for cases that don’t have any More text (in which case it repeats the whole thing). Any ideas?

    Thread Starter three-star-dave

    (@three-star-dave)

    And I think I’ve done that:

    <?php if (strpos($post->post_content, ‘–>’)) : ?>
    <?php $aftermore = 3 + strpos($post->post_content, ‘–>’);
    echo substr($post->post_content,$aftermore);
    ?>
    <?php endif; ?>

    jeje you save my life, thank you all.
    I need this to modify a little Meenews Newsletter plugin, for a custom template.
    Any questions mail me.

    Bye

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can I display just the More / Extended text?’ is closed to new replies.