Home Forums Pro Themes Education Hub Pro Featured Slider is showing on Blog page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1161
    Linda
    Participant

    I have the Featured Slider set to Home Page/Front Page only. For some reason it’s also showing at the top of the Blog page. Can you please tell me how to fix this?

    #1163
    wensolutions
    Keymaster

    Hello @Linda,
    For this, you have to do some codings. Hope following hints will guide you through.

    – First make a Child Theme and activate it before you go making the following changes. You will have two new files functions.php and style.css .

    – After you are done with Child Theme set up copy and paste the following piece of PHP code in your child theme’s functions.php file.

    function education_hub_check_slider_status( $input ){
    
       global $post, $wp_query;
    
       // Slider status
       $featured_slider_status = education_hub_get_option( 'featured_slider_status' );
    
       // Get Page ID outside Loop
       $page_id = $wp_query->get_queried_object_id();
    
       // Front page displays in Reading Settings
       $page_on_front  = get_option( 'page_on_front' ) ;
       $page_for_posts = get_option( 'page_for_posts' );
    
        if ( 'entire-site' == $featured_slider_status || ( ( is_front_page()) && 'home-page' === $featured_slider_status ) ){
    
         $input = true;
       }
       else{
         $input = false;
       }
       return $input;
    
     }

    This should do the trick to remove the Featured Slider from showing at the top of the Blog page.

    If you face any sort of difficulty in deploying this then you can kindly post it here.

    Thanks,
    Regards!

    #1178
    Linda
    Participant

    Oh my goodness! Your theme demo does not have a slider at the top of the blog page so I thought it would be an easy (settings) fix.

    Do you have a child theme for Education Hub Pro that I can download?

    #1181
    wensolutions
    Keymaster

    Sorry for inconvenience on this matter. We currently have no Child Theme available for this theme.

    However, we have easy solution for you to create a Child Theme through plugin approach by installing Once Click Child Theme plugin.

    Install and activate this plugin with required information being input for your child theme through Appearance Menu in your dashboard.

    Right after that go to functions.php file created in your child theme and add above PHP code snippets which will do the trick to control the slider in blog page.

    If you do not want to go through plugin approach to create a Child Theme, please check the codex documentation to create this in your own.

    We will be adding this feature too in our next update which is possibly releasing within couple of week.

    Write us back if you have any other problem or queries.

    Thank you for your time.

    #1182
    Linda
    Participant

    Thank you so much for info on the child theme plugin, and for the PHP code to remove the slider. You’re the best!

    I LOVE this theme, by the way! 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.