• Hi! I’m trying to add a slider image as my header image on my home page only.

    http://www.yogachikitsa.net

    I’ve downloaded the plugin vSlider 4.1.1 and have set up vSlider and played around with entering the code throughout the css. It either ends up removing a the header image throughout the site, or (when the code is entered in the page.php) on the home page but still displaying the ‘header image’ (when ‘featured image’ is removed)

    Any advice would be greatly appreciated! Thank you 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • Do you have the skills to edit your header.php file?

    Do not edit the Twenty Eleven theme. First create a child theme for your changes.

    Thread Starter yogachikitsa

    (@yogachikitsa)

    Yes, I feel comfortable editing the header.php file. But I found this added the slider image to ALL pages, I really only want it on the home page. Any suggestions?

    Thanks!

    @esmi – Look before you leap. yogachikitsa has a properly set-up child theme already. Easily determined by looking at the css header.

    I would look at the WordPress Codex for using conditionals. I will post back shortly. Just got called away. esmi could show you to the section or maybe show a sample is_front_page() usage.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @esmi – Look before you leap

    That’s good advice. Did you look at the site? 😉

    Here’s the style sheet.

    http://www.yogachikitsa.net/wp-content/themes/twentyeleven/style.css

    Which last time I looked was in fact not a child theme.

    http://codex.wordpress.org/Child_Themes

    @yogachikitsa The reason you want to use a child theme is so that when the Twenty Eleven theme gets updated (and it will) then you will not lose any of your hard work. That’s kinda the point.

    When you do have a child theme setup then make a copy of the twentyeleven/header.php into your child theme and you’ll protect your changes.

    Where did and how did you add the slider code? The conditional that your looking for is either is_front_page() or is_home() but having a code snippet will make it easier to provide you with a specific example.

    http://codex.wordpress.org/Function_Reference/is_front_page
    http://codex.wordpress.org/Function_Reference/is_home

    Thread Starter yogachikitsa

    (@yogachikitsa)

    Thanks Jan! I’ve created a child theme for my site (I think 😉 )

    I’ve tried adding the slider code in the header.php (this put it on every page) and in the main page.php (this put the slider on the home page only, but below the ‘header image’ (with ‘featured image’ removed)

    Thanks again for your help!!!

    I hope I am correct.

    There are links in that header Image border (bottom) going nowhere otherwise its a nice site.

    You maybe need to look at the Plugin and edit. Take out any a href=”…or link to your fav sites.>

    J

    @jan and @esmi we are all correct….

    @yogachikitsa I see an attempt to create a child theme has been made. Look at the header info in the css and you will see why I said it was prpoerly child-themed. I kept missing that the path to the css file was proving otherwise.

    You essentially have your own custom theme that will not benefit from any updates from the original authors. Not a death knell by any means. What you could do is try to download a fresh copy of the twentyeleven theme and then follow the codex for the proper way to do this. The part that seems to have been missed for your theme is the part where you create a new theme folder (i.e name it twentytwelve-child), create a new css file in it named style.css and go from there.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    *Jan drinks more coffee and goes on a small tangent*

    @jan and @esmi we are all correct….

    Right. Next time please check yourself before you make statements like that when others make suggestions. Or at least disagree respectfully. 😉

    Not a death knell by any means.

    Aaaand I respectfully disagree with you there. It’s not that yogachikitsa (great user ID BTW 😉 ) will lack support but by modifying files in the same directory called themes/twentyeleven when the update comes out all those changes will get deleted.

    Right now that site is using Jetpack’s Custom CSS module and that’s a good thing as that will preserve your CSS changes. But what we were discussing modifying the theme’s header.php file and that should either be done in a child theme (yes, I am a broken record on coffee) or via a whole new copy of the theme with a whole new name.

    *We now return to our regularly scheduled topic*

    Back to the original question:

    Thanks Jan! I’ve created a child theme for my site (I think 😉 )

    Maybe. 😉 Have you made changes to the header.php file? If you have then I or others including HallMarc may be able to provide you some easy steps to get that into your very own child theme. But knowing what changes to PHP files (if any) would help that discussion a little.

    From looking at your site (very relaxing color scheme) it looks like you know your way with CSS. I’m sure a child theme if you need one wouldn’t be hard for you to do.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Installing a slider image on my home page’ is closed to new replies.