Support » Fixing WordPress » Hide everything from before red more in full atricle.

  • Hi there.

    I have a small problem.

    I have to hide everything what appears before <!–more–> in full article.

    Is there a way of doing this?

    Many thanks for your help in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    you probably need to edit single.php of your theme and add the parameter to the_content()

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

    $strip_teaser
    (boolean) (optional) Should the text before the “more” link be hidden (TRUE) or displayed (FALSE).
    Default: FALSE

    Hi,

    Thank you for reply.

    I have tried this:

    global $more;
    $strip_teaser = false;
    the_content();

    And it is still showing the entire article.

    Sorry, I’m new to WP. What am I doing wrong here?

    Thank you

    Michael

    (@alchymyth)

    Forum Moderator

    you need to add the parameter into the brackets of the the_content() function:

    for instance, try:

    <?php the_content( 'read more...', true ); ?>

    (untested)

    Works perfect, thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide everything from before red more in full atricle.’ is closed to new replies.