Reply To: Show Slider on Front Page Only

#4673
Ron
Keymaster

You can add this on a child-theme’s functions.php

function remove_default_slider() {
	remove_action( 'frontier_before_main', 'frontier_slider_on_main' );
	remove_action( 'frontier_before_content', 'frontier_slider_on_content' );
}
add_action( 'after_setup_theme', 'remove_default_slider', 11 );
function slider_on_front_page() {
	if ( is_front_page() ) {
	     echo '<div id="slider" class="slider-content">';
	     get_template_part('slider');
	     echo '</div>';
	}
}
add_action( 'frontier_before_content', 'slider_on_front_page' );