Add slider/menu shortcode below masthead across whole site

Hi, great theme but I’m struggling to add a universal slider and inline navigation bar to all the pages across my site - including Woo Commerce category pages. I’m working on X Theme using the Renew stack, I’ve created my child theme but can’t find a wp_header.php in my master theme file so have been going by the masthead.php file within the ‘Header’ folder of ‘Views’ of the parent theme but I’m not having any luck.

I’ve found various articles within this forum talking about editing the functions.php / wp_header.php files within the child theme but I’m not sure if I’m placing the code in the correct place - and what the exact code is for displaying shortcode content below the masthead, permanently.

Looking forward to your response!

Hi There,

Please try adding the following code under functions.php file locates in your child theme:

add_action( 'x_after_view_global__navbar', 'x_print_top_slider' );
function x_print_top_slider(){
	echo do_shortcode( '[your-slider-shortcode]' );
	echo do_shortcode( '[your-menu-shortcode]' );
}

Hope it helps :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.