WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Separate the content in single post before and after more tag (4 posts)

  1. vicius
    Member
    Posted 2 years ago #

    Hello,
    can not find the solution how to separate the post content in single post. I would like to show separately the content which is available till <--more--> tag, then to add some extra code (featured images, adds...) and then to show the rest of the content which is available after <--more--> tag.
    Would appreciate any suggestions, thanks in advance..!

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    can be done by fully utilising all parameters of the_content() and by setting the $more variable accordingly;

    http://codex.wordpress.org/Function_Reference/the_content
    http://codex.wordpress.org/Customizing_the_Read_More

    already asked and answered in this forum:
    http://wordpress.org/support/topic/separate-before-and-after-from-the_content?replies=5

    for example, replace <?php the_content(); ?> single.php with the suggested code.

  3. vicius
    Member
    Posted 2 years ago #

    Thank you very much!
    Still didn't tested, but from the code it looks like it should work.

  4. vicius
    Member
    Posted 2 years ago #

    Works great, just if you don't insert More tag, then the <!--the area inbetween--> also won't be showm. But i can live with that. Thank you one more time!

Topic Closed

This topic has been closed to new replies.

About this Topic