• Resolved nazguluk

    (@nazguluk)


    Hi there,

    Fantastic plugin, I love it!

    I have been reading through the support responses and am almost where I need to be, but am a complete beginner!

    I want the slider to show on the home page, and a static image on the other pages. I have kind of got there by setting a second slideshow with two slides identical, and the following code

    <?php if ( is_front_page() ) {
    
    	if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("home", ""); }
    
    } else {
    
    	if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("nothome", ""); }
    
    } ?>

    But I would much prefer to just have a static image as the ‘else’ option.

    Could you please help?

    Thanks!

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

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

    (@jleuze)

    Replace the second slideshow with a img tag to load a static image:

    <?php if ( is_front_page() ) {
    
    	if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("home", ""); }
    
    } else {
    
    	echo '<img src="', bloginfo( 'template_directory' ), '/images/default-header.jpg" alt="" />';
    
    } ?>
    Thread Starter nazguluk

    (@nazguluk)

    Thank you!

    Thread Starter nazguluk

    (@nazguluk)

    Hi there,

    Is there a way I can get the featured image to appear for a page if one exists in the place of the slider?

    Thanks!!

    Plugin Author Josh Leuze

    (@jleuze)

    Sure, just add a conditional to check for the featured image, like this:

    <?php if ( is_front_page() ) {
    
    	if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("home", ""); }
    
    } elseif ( has_post_thumbnail() ) {
    
    	the_post_thumbnail();
    
    } else {
    
    	echo '<img src="', bloginfo( 'template_directory' ), '/images/default-header.jpg" alt="" />';
    
    } ?>
    Thread Starter nazguluk

    (@nazguluk)

    Fantastic, thank you Josh!!!

    I am trying to get the captions and excerpts working. I can see them but they are cut off the bottom of the slider.

    https://technibods.co.uk/headway

    Do you have any idea on how I can get them to show in the bottom left corner please?

    Thanks for a great plugin and amazing support!!

    Plugin Author Josh Leuze

    (@jleuze)

    I see the title, but not the caption, are you outputting both?

    Wrap the title and caption on a container, give it a class of “meteor-caption” or something, and then style that container like the caption example in the documentation:

    .meteor-caption {
        background: transparent url('images/title-bg.png') repeat top left;
        bottom: 0;
        left: 0;
        color: #000;
        margin: 0;
        padding: 2%;
        position: absolute;
        text-align: left;
        width: 96%;
    }

    For that example, you’d need to create a semi-transparent background PNG for the caption and add it to your theme’s images.

    Thread Starter nazguluk

    (@nazguluk)

    Hi Josh,

    I already had something like that in the custom CSS, I styled the excerpt to be wrapped in H1 tags, and am only outputting that so it is very simple for the customer to change the image text.

    My problem is the positioning, it is cut off at the bottom of the slide – can you assist in how to correct that please?

    Thanks so much!

    Plugin Author Josh Leuze

    (@jleuze)

    Ah, I thought you needed both. I see the title, but no styling for the title. Try adding something like this to your theme’s stylesheet:

    .meteor-slides h1 {
        bottom: 10px;
        color: #FFFFFF;
        font-size: 30px;
        height: 30px;
        left: 10px;
        line-height: 30px;
        margin: 0;
        padding: 0;
        position: absolute;
        text-shadow: 1px 1px 5px #000000;
        width: 100%;
    }
    Thread Starter nazguluk

    (@nazguluk)

    Great, thank you Josh!

    Plugin Author Josh Leuze

    (@jleuze)

    You’re welcome!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Meteor Slides] Static image if slideshow not assigned to page’ is closed to new replies.