Thread Starter
zjb407
(@zjb407)
Here’s another website that has it
http://www.frithstreetdesign.co.uk/
based on this forum
https://ww.wp.xz.cn/support/topic/sela-theme-adding-a-slider-instead-of-a-hero-image?replies=8
however I would like to code it directly into the child theme functions.php
However I’m wondering the code to write to get it to only display on the homepage.
I’m only seeing the slider on your homepage currently, in the body of your page. Can you explain what the problem is with where your slider is being displayed right now so I can help? It seems to be where you want it (i.e. only on the homepage) so perhaps you already figured this out?
Thread Starter
zjb407
(@zjb407)
Sorry if I wasn’t clear.
I want the slider to be
1. The Full width of the header menu, and right up against it.
2. On the Front page only
Right now it’s on the front page because I pasted the shortcode into the Page, however I want it to essentially become part of the header, i.e. same width, no gap.
You could try making a child theme and adding the slideshow code to the header.php file, below the menu
Using a child theme means your tweaks won’t be overwritten when updating the theme. Here are some guides in case you haven’t made one before:
http://codex.ww.wp.xz.cn/Child_Themes
http://op111.net/53/
http://vimeo.com/39023468
You’ll need to find out from the plugin if they provide code you can use within template files, as opposed to a shortcode you can use in posts and pages.
If they do, you can put that within a conditional to check for the homepage:
<?php if ( is_front_page() ) {
// your PHP template code from the plugin
}
?>
More about that conditional:
https://codex.ww.wp.xz.cn/Function_Reference/is_front_page
If the template code is HTML and not PHP you’ll need to close the PHP first, and reopen it like this:
<?php if ( is_front_page() ) {
?>
// your HTML template code from the plugin
<?php
}
?>
The above code is untested and I strongly suggest trying it out either on a local install or remote test site to avoid breaking your site. 🙂 Good luck with it!