[Resolved] Insert Slider on Startpage

Home Forums Support [Resolved] Insert Slider on Startpage

Home Forums Support Insert Slider on Startpage

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #283004
    Torsten

    Hi,

    using the Pro-Version, activated all Plugins. When inserting my Slider Code, in the Content Section, it appears on all pages. But i would like to have the slider on first page only. How can i get this?

    Regards
    Torsten

    #283057
    Leo
    Staff
    Customer Support

    Hi Torsten,

    Try using After Header Content or After Header hook:
    https://docs.generatepress.com/article/hooks-overview/
    http://demo.generatepress.com/hook-locations/

    Add this inside the hook of your choice:

    If the home page is the blog:

    <?php if ( is_home() ) : ?>
        Slider here
    <?php endif; ?>

    If it’s a static page:

    <?php if ( is_front_page() ) : ?>
        Slider here
    <?php endif; ?>

    Make sure execute php is checked.

    Let me know.

    #283170
    Tom
    Lead Developer
    Lead Developer

    If it’s a static page you could also add the shortcode into the Page Header add-on on that specific page.

    #283324
    Torsten

    Thank you, this works fine for me!

    #283481
    Leo
    Staff
    Customer Support

    Glad we could help!

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