WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] grabbing full posts when the page has a more section (3 posts)

  1. dcarmo
    Member
    Posted 2 years ago #

    hello!

    I am trying to get the full post of a blog when it has a more section on it. So I have a post in my blog that has a 'click here for more section', and I am trying to grab the whole post even with this section on the page.

    I am using get_the_content() but it seems to only grab the post up until this more tag. Is there a special setting I need to use to get the full post past the get_the_content() section?

    Thanks,
    Carmo

  2. Sam Scholfield
    Member
    Posted 2 years ago #

    Use:

    global $more;    // Declare global $more (before the loop).
    $more = 1;       // Set (inside the loop) to display all content, including text below more.
    the_content();

    instead of get_the_content();

    get_the_content will put it into a variable, so $text = get_the_content(); is the correct usage. If this is what you are after, then $more still applies.

    Have a look at the the_content() in the codex

  3. dcarmo
    Member
    Posted 2 years ago #

    Awesome that perfect! just what I was looking for :D and it works fine with get_the_content() which is the method that I am using and needed to use to store the info.

    Thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Topic