-
AuthorPosts
-
September 22, 2018 at 4:28 pm #1013091
Hi,
I’d like to add a revolution slider to some of my pages, before the title/breadcrumb section. How can I do that?
Thanks
-
This topic was modified 7 years, 1 month ago by
SilviaNT.
September 23, 2018 at 3:59 pm #1013340Hi,
Is it possible to add short code in the header.php for this purpose?
September 23, 2018 at 8:24 pm #1013408Hi SilviaNT,
Yes, it’s possible to use a shortcode for that.
You can use this hook ava_after_main_title to insert the shortcode after the title/breadcrumb section.
Hope this helps.Best regards,
NikkoSeptember 24, 2018 at 12:35 am #1013434Hi Nikko,
Is the hook ava_after_main_title already in the header.php or do I add this hook? If so, where should it be added?
Thanks
September 24, 2018 at 12:08 pm #1013567Hi SilviaNT,
The hook is located just below the header, just after the title & breadcrumbs section.
You should see it in files like page.php, single.php, etc.
You just need to hook it and add the php code at the bottom of functions.php, an example of the code you use is:function my_slider() { echo do_shortcode("[myshortcode]"); } add_action('ava_after_main_title', 'my_slider');Just replace [myshortcode] with the shortcode you will use.
Hope it helps.Best regards,
NikkoSeptember 25, 2018 at 3:21 am #1013953Hi Nikko,
I’ve added the code to the bottom of functions.php, however I can’t see the slider on my page. I’ve attached the screenshot of the code.
September 25, 2018 at 4:08 am #1013955I added the slider shortcode in the header.php file, under the <div id=’main’ line. The slider seems to be working now.
September 25, 2018 at 6:26 am #1014003 -
This topic was modified 7 years, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
