WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Meteor Slides] Add slides to only home page if no blogs? (theme: PageLines)

[Plugin: Meteor Slides] Add slides to only home page if no blogs? (theme: PageLines)

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

    @jleuze

    You need to use a conditional statement for this, if you’re using a static homepage, you want to use is_front_page.

    Try adding this to your header.php file:

    <?php if ( is_front_page() ) {
    
    if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow(); }
    
    }?>

    That did work, excellent! Now, since it’s not, strictly, an object, how can I center it in the header?

    Right now I have

    div.center {   margin-left: auto;   margin-right: auto;   width: 8em; }

    in the styles.css, but it doesn’t center in the header, but on some non-specific body element between the two columns.

    Here’s the URL: http://coffandstone.com

    Thanks again for your time.

    Hi
    its exiting to see that i could add it to pageline..
    i am using it here fusioncreation.com/jaipuring for some testing purpose
    but friend my problem is tha how do i center align this….

    thanks in advance

    Plugin Author Josh Leuze

    @jleuze

    @grtgrfx It looks like the slideshow is centered, did you get it fixed?

    @joshi.alok Add this to your theme’s stylesheet to center the slideshow:

    #page .meteor-slides {
        margin: 0 auto;
    }

    Got it to work fine. Thanks, looks great! Keep up the good work.

    Plugin Author Josh Leuze

    @jleuze

    Glad to hear you got it figured out.

    Hi again! The devs of the PageLines theme yelled at me for modifying the header.php template file (for good reason, of course), so I added a child theme, pagelines-child. Can I create a child header.php file and add our slideshow code to it instead of the default theme file? I know about child css files but not the template php files, so don’t know whether an @import url command does the same thing.

    Thanks, Eric

    Plugin Author Josh Leuze

    @jleuze

    Hi Eric, if you are using a child theme, you can override any file from the parent theme by adding a new version to the child.

    Copy the header.php file from the parent theme into the child theme and add the slideshow to that. There might also be some hooks in the parent theme that your could insert the slideshow into to avoid replacing the header file, but that’s a bit more complicated.

    Got it and did it, new child header.php in the child directory. Works fine. Best wishes, Eric

    Plugin Author Josh Leuze

    @jleuze

    That’s good to hear!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Meteor Slides] Add slides to only home page if no blogs? (theme: PageLines)’ is closed to new replies.