WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
Add slides to only home page if no blogs? (theme: PageLines) (11 posts)

  1. grtgrfx
    Member
    Posted 2 years ago #

    I'm building a static site with a home page and some interior pages using the PageLines theme. None are blog posts, so I can't test for that. I want to add the slideshow to the bottom of the header on the home page only. What code would tell slideshow not to appear on inside pages? Thanks!

    http://wordpress.org/extend/plugins/meteor-slides/

  2. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    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(); }
    
    }?>
  3. grtgrfx
    Member
    Posted 2 years ago #

    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.

  4. joshi.alok
    Member
    Posted 2 years ago #

    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

  5. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    @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;
    }
  6. grtgrfx
    Member
    Posted 2 years ago #

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

  7. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    Glad to hear you got it figured out.

  8. grtgrfx
    Member
    Posted 2 years ago #

    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

  9. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  10. grtgrfx
    Member
    Posted 2 years ago #

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

  11. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    That's good to hear!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic