Archived topic
Insert Slider on Startpage
4 replies · Started by Torsten on February 23, 2017
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
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.
If it's a static page you could also add the shortcode into the Page Header add-on on that specific page.
Thank you, this works fine for me!
Glad we could help!