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
Hi,
Is it possible to add short code in the header.php for this purpose?
Hi 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,
Nikko
Hi 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
Hi 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,
Nikko
Hi 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.
I added the slider shortcode in the header.php file, under the <div id=’main’ line. The slider seems to be working now.