Forums

[resolved] Hide part of post - is it possible? (3 posts)

  1. Yarz
    Member
    Posted 2 years ago #

    Hello all,

    I have a little problem and was wondering if you can help me out.
    This is what I want:
    I want to hide the text before the <!-- read more--> tag on the read more page. So that if you click on 'read more' you do not see what was on the frontpage.
    Is it possible to do this?
    Thanks in advance for any help or ideas.

    Greetings,
    Stefan

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Use something like this in your single post template.

    //all post content after <!--more-->
    $aftermore = 11 + strpos($post->post_content, '<!--more-->');
    echo 'this is after the more >' . substr($post->post_content,$aftermore);

    Related:
    Stepping Into Templates
    Template Hierarchy

  3. Yarz
    Member
    Posted 2 years ago #

    Thank you very much for helping me out here! It is working all fine.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags