add widget-wrap (alignment issue)

Community Forums Forums Design Tips and Tricks add widget-wrap (alignment issue)

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  moneyfunk 1 year, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #20602

    moneyfunk
    Participant
    Post count: 24

    I took the elements from the Blissful ( ‘home-top’ ) and added them to the Lifestyle home page. but I cannot get the thumbnails to align horizontally, like in the blissful demo. Please help.

    http://www.test.oatmeal-bowl.com

    1. first I added “dynamic sidebar (home-top)” to the home.php
    /**
    * Add widget support for homepage. If no widgets active, display the default loop.
    *
    */
    function lifestyle_home_loop_helper() {
    if ( is_active_sidebar( ‘home’ ) || is_active_sidebar( ‘home-left’ ) || is_active_sidebar( ‘home-right’ ) ) {
    dynamic_sidebar( ‘home’ );
    dynamic_sidebar ( ‘home-top’ );

    if ( is_active_sidebar( ‘home-left’ ) ) {
    echo ‘<div id=”homepage-left”>’;
    dynamic_sidebar( ‘home-left’ );
    echo ‘</div><!– end #homepage-left –>’;
    }
    if ( is_active_sidebar( ‘home-right’ ) ) {
    echo ‘<div id=”homepage-right”>’;
    dynamic_sidebar( ‘home-right’ );
    echo ‘</div><!– end #homepage-right –>’;
    }

    }
    else {
    genesis_standard_loop();
    }

    }
    2.  added to the functions.php
    genesis_register_sidebar( array(
    ‘id’ => ‘home-top’,
    ‘name’ => __( ‘Home Top’, ‘blissful’ ),
    ‘description’ => __( ‘This is the top section of the homepage’, ‘blissful’ ),
    ) );
    3. completed with
    #content .widget-wrap {
    margin: 0 0 20px;
    overflow: hidden;
    }
     

     


    #20606

    Tony @ AlphaBlossom
    Participant
    Post count: 534

    Hello, you’ll have to add float: left to their css styles.

    around line 1282 in your child-theme css you’ll see:


    .featuredpage .page,
    .featuredpost .post {
    margin: 0 0 10px;
    overflow: hidden;
    padding: 5px 0;
    }

    You can add “float: left;”, and then adjust your margins to space them out and that will take care of it.

    I’m not sure how that may affect other pages, so it might be better to add a style just for the home page:


    .home .featuredpost .post {
    margin: 0 xxpx 10px; /* adjust your margin here */
    float: left;
    }

    If that affects something else that you don’t want changes, you can be really specific and use #featured-post-14 .post instead.


    #20609

    moneyfunk
    Participant
    Post count: 24

    I realized later that I didn’t have the <div=”widget-wrap”> elements around the ( ‘home-top’ ). Then when i tried to updated in the home.php file…

    I used this:

    if ( is_active_sidebar( ‘home-top’ ) ) {
    echo ‘<div id=”widget-wrap”>’;
    dynamic_sidebar( ‘home-top’ );
    echo ‘</div>’;
    }

    it wrapped the ‘widget-wrap’ around each featured post(s) and not as a collective element.

     

    Your .home solution worked w/out affecting any other elements. Going to play with the margins in a bit.

    Thank you, Tony! I appreciate it.


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

You must be logged in to reply to this topic.