Home › Forums › Pro Themes › Education Hub Pro › Featured Slider is showing on Blog page
Tagged: Featured Slider, home page/front page
- This topic has 4 replies, 2 voices, and was last updated 8 years, 10 months ago by Linda.
-
AuthorPosts
-
February 4, 2016 at 1:11 am #1161LindaParticipant
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?
February 4, 2016 at 3:34 am #1163wensolutionsKeymasterHello @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!February 4, 2016 at 10:56 am #1178LindaParticipantOh 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?
February 4, 2016 at 12:03 pm #1181wensolutionsKeymasterSorry 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.
February 4, 2016 at 12:52 pm #1182LindaParticipantThank 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! 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.