Show Slider on Front Page Only

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #4670

    I am not sure if that’s a reasonable question but I have never seen a website with the slider being on the Front page but also on the post or news page. How can I get the slider to only display on the front page??
    In the Frontier Options, it says it will display on both the front and posts pages but I do not want that to be the case. I only want the slider on the front.


    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">';
    	     echo '</div>';
    add_action( 'frontier_before_content', 'slider_on_front_page' );
    Joe McD

    Ron, thank you for this code. It worked perfectly on my site.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Frontier’ is closed to new topics and replies.