Image slider in header area?

Viewing 8 posts - 1 through 8 (of 8 total)
  • #17667
    maonik
    Participant

    Pinboard is so beautiful!
    I would like to have an image slider / image rotator in the header area.
    I can make the slider work but only below the menu and I would like it to be at the top and full size in the surrounding wrapper, if you know what I mean.
    Is that possible somehow?
    Thanks!

    #17670
    Daniel Tara
    Keymaster

    Open header.php and place this code above <nav id="access">:

    <?php if( is_home() && ! is_paged() && pinboard_get_option( 'slider' ) ) : ?>
    	<?php get_template_part( 'slider' ); ?>
    <?php endif; ?>

    Then open index.php and delete this code:

    <?php if( pinboard_get_option( 'slider' ) ) : ?>
    	<?php get_template_part( 'slider' ); ?>
    <?php endif; ?>
    #17672
    maonik
    Participant

    Daniel, thanksn so much. However, that code addition in the header does not insert the slider there for me.

    I have it sandwiched like this:

    <?php get_sidebar( ‘header’ ); ?>
    <div class=”clear”></div>
    <?php if( is_home() && ! is_paged() && pinboard_get_option( ‘slider’ ) ) : ?>
    <?php get_template_part( ‘slider’ ); ?>
    <?php endif; ?>
    <nav id=”access”>

    Is there anything else I have to do? I switched the header image off because I figured that would get in the way.

    Another question: If WordPress get updated, then these changes will be gone, right? So I better make notes of the changes I make to the php files and re-do them after an update, correct?

    Thank you very much.

    #17678
    maonik
    Participant

    Daniel, this is so cool. I got the slider to work in the header by basically moving the code you said to delete in the index.php file to the header.php file (without that addition “if( is_home() && ! is_paged()”, I have no idea what repurcussions that omission might have).

    Now, I stand before the next problem. I had modified the CSS to erase the margins all around my header image:
    #site-title img { margin: 0 !important; }

    This of course doesn’t work for the slider. That would have been too easy πŸ˜‰

    Do you know of a way to address the slider via the CSS?

    Thanks again!

    #17686
    Daniel Tara
    Keymaster

    I’m not sure what you mean. I tested the theme with the slider above the navigation and there are no visual disproportions.

    #17693
    maonik
    Participant

    Sorry for being unclear! I would like the slider to align flush at the top. At the moment there is a 60px white space on top. Perhaps a screenshot will help.

    Example white space on top of slider in header area.

    Thanks again!

    #17696
    Daniel Tara
    Keymaster

    Open header.php and delete everything between <header id="header"> and <div class="clear"></div>.

    #17701
    maonik
    Participant

    Thank you so much!! That did it!

    Thankyouthankthankou.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.