[Resolved] full posts under homepage

Home Forums Support [Resolved] full posts under homepage

Home Forums Support full posts under homepage

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #108797
    Sander van der Harst

    Hello

    I want to show under my homepage text (static page) the latest posts. I can’t figure out how to do this. I hope you can help me.

    If you want I can sent you a prc.

    http://www.mooidoelpunt.nl

    Kind regards,

    Sander

    #108893
    Tom
    Lead Developer
    Lead Developer

    By default, WP doesn’t allow content to be added to the posts page.

    What you can do is use GP Hooks to target the posts page, and add your content that way.

    For exmaple, in GP Hooks, add this to the “Before Content” hook:

    <?php if ( is_home() ) : ?>
          Everything in here will show up on the posts page
    <?php endif; ?>

    Let me know if that works for what you’re trying to do πŸ™‚

    #109111
    Sander van der Harst

    Hi Tom

    Thanks for your quick reply

    This is almost what I want for the site. Only know With the hooks the text is shown above all posts en pages. I just want one homepage with text. Under the homepage/text I want to show the newest (full) posts. These are short movies.

    Maybe you have a solution?

    #110768
    Tom
    Lead Developer
    Lead Developer

    Sorry for not getting back to you sooner! Not sure how I missed this.

    The code I provided above should only show up on your posts page.

    Make sure you check the “Execute PHP” checkbox within the hook.

    Let me know – I’ll reply faster this time, promise! πŸ™‚

    #111725
    Sander van der Harst

    Hi Tom

    Thanks for your reply and no worries! I fixed it an other way. When I have other questions I will find you πŸ˜‰

    Sander

    #111774
    Tom
    Lead Developer
    Lead Developer

    I’ll be here! πŸ™‚

    #135842
    Austin

    I tried the above code but it’s showing up on top of each post instead of just the top of the homepage?

    #135864
    Tom
    Lead Developer
    Lead Developer

    Is the “Execute PHP” checkbox checked?

    #135981
    Austin

    Yes Tom (thanks for fast reply).

    #135993
    Austin

    Sorry maybe I should have mentioned my home page is showing latests posts not static page, when I switch to static page it works but not if the homepage is set to recent posts.

    #136054
    Tom
    Lead Developer
    Lead Developer

    The below code only works on the posts page, not static pages:

    <?php if ( is_home() ) : ?>
          Everything in here will show up on the posts page
    <?php endif; ?>

    If that’s not working, you must have some sort of syntax error going on.

    Can you paste the code you’re using in here? Be sure to highlight it and click the “code” button in the editor.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.