Hi there,
It would be possible to do this.
You would need to edit the header.php file probably and use conditional logic to display which Meta Slider you’d like.
Something like:
if ( is_front_page() && is_home() ) {
// Default homepage
} elseif ( is_front_page() ) {
// static homepage
echo do_shortcode("[metaslider id=1111]");
} elseif ( is_home() ) {
// blog page
echo do_shortcode("[metaslider id=2222]");
} elseif ( is_page( 'about-me' ) ) {
// Page with a post_name (slug) of "about-me"
echo do_shortcode("[metaslider id=3333]");
}
Thanks,
Dave
Thread Starter
Anthyx
(@anthyx)
Thanks a lot to you Dave!
fact is that this way I have to add a line to the header.php each time I add a new page. I could use Meta Slider just for the home page.
Do you know if it’s possible to have a header image without using the featured image? My theme is twenthy-eleven.
Again, many thanks!
Hi there,
I’m not sure about the header image and the featured image sorry – could you direct that question to the twenthy-eleven forum?
Thanks,
Dave
Thread Starter
Anthyx
(@anthyx)
Hi Dave,
thanks a lot again, I’ve solved the problem with the featured image for the header in twenty-eleven.
One last thing: I’m migrating from the old slider plugin, easingslider (discontinued, as it seems), to Meta.
Right now this is the code I use in my header php for easingslider is:
if ( is_front_page() or is_home() or is_search() ) {
if ( function_exists( ‘easingsliderlite’ ) ) {
easingsliderlite();}
}
else if ( $header_image ) :
This allows me to have the sliders working ONLY in the main pages (in both languages) and in search page.
How should I change your previous code to have the same effect? Can I replace it entirely to the easing slider code? (Sry I’m really not into programming)
Thanks a lot again!
A.
Hi,
Try this:
if ( is_front_page() or is_home() or is_search() ) {
echo do_shortcode("[metaslider id=1111]");
}
else if ( $header_image ) :
Just change the ID to match the slider you want to display.
Thanks,
Dave
Thread Starter
Anthyx
(@anthyx)
Thanks a lot again Dave,
I have just installed Meta Slider and changed the Header.php and it works fine.
I just want to notify you a couple of small problems:
please go to my website http://www.webfoodculture.com
1) When the slider is loaded (or it’s reloaded), it takes a couple of seconds to reach the right size, resulting in a small “jump” (reload my home page and you’ll see ehat I mean).
Since your plugin has so many options, is there one to fix this strange behaviour? (I use the default settings with just a small increase of slide delay and animation speed times)
2) I have tried the “Coin Slider” random effects: they are very nice but when I try to see the page on my ipad mini, the header and and body of the page show huge problems.
Many thanks again Dave!
A.