[Resolved] after content hook content ONLY after posts ?

Home Forums Support [Resolved] after content hook content ONLY after posts ?

Home Forums Support after content hook content ONLY after posts ?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #266255
    BarnaB

    Hi

    I created a WPSP list to be placed after the blog posts, but it shows up after the pages too…Is it possible to use this only after posts ?

    Thanks

    #266256
    BarnaB

    never mind just used it like soo :

    <?php if ( is_single() ) : ?>
    [wp_show_posts id=”104113″]
    <?php endif; ?>

    and it only comes on on blog posts πŸ™‚

    #266332
    Leo
    Staff
    Customer Support

    Glad you found a solution!

    #280040
    Jasper

    Can i use this thread? How to not only use on posts but also postarchives?

    #280196
    Leo
    Staff
    Customer Support

    Hi Jasper,

    It would something like this:

    <?php if ( is_single() || is_archive() ) : ?>
    [wp_show_posts id=”104113β€³]
    <?php endif; ?>

    Let me know if this is what you are after.

    #280204
    Jasper

    thanks, last question: how do i define in a hook all pages except the home page, that is probably an easier solution for me

    #280206
    Leo
    Staff
    Customer Support

    Is your home page the blog page or just a regular page?

    The structure I used in this post should help:
    https://generatepress.com/forums/topic/smartslider3/#post-279950

    Have a look and let me know if need more help πŸ™‚

    #280273
    Tom
    Lead Developer
    Lead Developer

    If the home page is the blog:

    <?php if ( ! is_home() ) : ?>
        This content will show up everywhere except for the posts page
    <?php endif; ?>

    A static page:

    <?php if ( ! is_front_page() ) : ?>
        This content will show up everywhere except for the front page
    <?php endif; ?>
    #280280
    Jasper

    Thanks!!

    #280281
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

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