• Resolved artshowapplepie

    (@artshowapplepie)


    Hi,

    First of all thank you so much for building/creating this amazing plugin, i love it ! it’s so simple to embed and easy to use ! great !

    but i do have 1 question.
    i’m building a website with say 5 main navigation pages home / projects / news blabla, i want to put a different header with your slider plugin on all pages but i can’t seem to figure out how to do so. could you help me out?

    also is it possible to rotate each slide different as projects are devided in child pages etc.

    hope you can help!

    thanks

    lauren

    https://www.ads-software.com/extend/plugins/meteor-slides/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Josh Leuze

    (@jleuze)

    Thanks Lauren, you’re welcome!

    You can load multiple slideshows in the header using a conditional statement like this:

    <?php if ( function_exists( 'meteor_slideshow' ) ) { 
    
    	if ( is_home() ) {
    		meteor_slideshow( "home", "" );
    	} elseif ( is_page( 'about-us' ) ) {
    		meteor_slideshow( "about-us", "" );
    	} else {
    		// Add a default slideshow or image here
    	}
    
    } ?>

    This code assumes that you are using the blog as your homepage, if you’re using a static page, you’ll need to use the is_front_page function instead.

    What do you mean exactly by rotating each slide differently?

    Thread Starter artshowapplepie

    (@artshowapplepie)

    Thank you for the super fast response !

    I’m using the standard twenty eleven theme and customizing it to my own needs ??

    I kind of get the code but i don’t know in which .php file to place it ?

    I would like have the index open with a different header rotating script as i can’t seem to find how to add text as a span maybe on the image using meteorslides? but all other pages will work with your great plugin. with that also in mind can i link the index.php header to a different header and all the other to meteor_slideshow using the code above?

    so maybe a stupid question but where do i find the ‘id’s’ for all the pages as i get the about-us are the names titles of the pages ?

    Also with the rotating i ment that each slideshow which is as said different on almost each page could start with a random picture added in that slideshow. say for instance i have a slideshow named index and there are 5 images. each time the slideshow loads it sets the pictures randomly. it’s not that important but would have been could to achieve.

    hope this is somehow readable !

    thanks again!

    Plugin Author Josh Leuze

    (@jleuze)

    If you want to add the slideshow to your header, you’ll need to edit the header.php file.

    I would try to stick with just one slider script if you can, they tend to conflict with each other, and even when they do work, can start to take up a lot of resources. You can add captions to the slideshow using a custom slideshow template, but if you only want the text on one slideshow, you might want to add it right to the slide images.

    In the above example, “home” and “about-us” are the page and slideshow slugs, that is what you use to check for a page or to load a specific slideshow, make sure you don’t use the slideshow title instead.

    You can set a slideshow to random using metadata.

    Hi JLeuze,

    How do I check if there is a slideshow available or not for a given page?

    <?php if ( function_exists( 'meteor_slideshow' ) ) {
    				if ( is_home() ) {
    					meteor_slideshow( "home", "" );
    				} elseif ( is_page( $page ) ) {
    					meteor_slideshow( $post->post_name, "" );
    				} else {
    					meteor_slideshow( "home", "" );
    				}
    			} ?>
    Plugin Author Josh Leuze

    (@jleuze)

    @kothinti Sure you can do that. The trick is you need to get the page slug, check if there is a matching slideshow slug and then if there is, load a slideshow with that page/slideshow slug, otherwise load a default slideshow:

    <?php if ( function_exists( 'meteor_slideshow' ) ) {
    	global $post;
    	$ms_page_slug = $post->post_name;
    	$ms_slideshow_check = term_exists( $ms_page_slug, 'slideshow' );
    	if ( is_home() ) {
    		meteor_slideshow( "home", "" );
    	} elseif ( !empty( $ms_slideshow_check ) ) {
    		meteor_slideshow( $ms_page_slug, "" );
    	} else {
    		meteor_slideshow( "default", "" );
    	}
    } ?>

    Hi there,

    Thanks for this very useful tips for meteor slider.
    It is really useful.

    But I’ve got one small problem.

    For the homepage and pages, it work perfect, but when the post_type is not ‘page’, it doesn’t seem to work.

    I am building this site:

    https://questaonline.com/evolution5/

    and I need to apply different slides on
    https://questaonline.com/evolution5/speakers/speaker6/

    but the post_type is ‘speaker’ for this page and I wonder that’s the reason the slider doesn’t appear.

    Could you please give me some idea how I can alter the code?

    Thank you

    Plugin Author Josh Leuze

    (@jleuze)

    @suziekim This code is specifically for dynamically loading different slideshows on different pages.

    Do you need to load the slideshows dynamically, or just need different slideshows on different pages and posts?

    jemtee

    (@jemtee)

    Great thread going on here.
    I’m having a problem just getting it show. Can see it if I insert the code into posts. But i want it as a header on all pages.

    This is the code:

    <?php if ( function_exists( 'meteor_slideshow' ) ) { 
    
    	if ( is_home() ) {
    		meteor_slideshow( "home", "" );
    	} elseif ( is_page( 'bjornenvagen-15-2' ) ) {
    		meteor_slideshow( "bjornenvagen-15-2", "" );
    	} elseif ( is_page( 'ovrig-information' ) ) {
    		meteor_slideshow( "ovrig-information", "" );
    	} else {
    		// Add a default slideshow or image here
    	}
    
    } ?>

    This is the page I’m trying to get it to work on.

    jemtee

    (@jemtee)

    zwebdesign.se/husiare

    and heres the link..

    Plugin Author Josh Leuze

    (@jleuze)

    @jemtee Code looks OK, are you using the default “blog” homepage, or did you set a page as the homepage? If you set a page you need to use is_front_page instead of is_home.

    The slideshow code isn’t showing up at all on the homepage, did you add it to the header.php file? There’s already a different slideshow in the homepage, something built into the theme, you might have to disable it if there are conflicts.

    On the other pages the slideshow is there, just hidden. Add this to your theme’s stylesheet and it should work correctly:

    div.meteor-slides {
    clear: both;
    }
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Meteor Slides] Different header slider on all pages’ is closed to new replies.