Minimum Theme: Structural Wraps

Community Forums Forums Design Tips and Tricks Minimum Theme: Structural Wraps

This topic is: not resolved

This topic contains 2 replies, has 3 voices, and was last updated by  sandy 1 year, 4 months ago.

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

    mikemahony
    Participant
    Post count: 7

    Hi, I am working with the Minimum theme and have changed a few things on the home page. I’ve added two “call to action” widgets–one above the social icons and one below the social icons. The client wanted to remove the blog posts from the bottom of the home page, so I simply added:

    remove_action(‘genesis_loop’, ‘minimum_grid_loop_helper’);

    That removed the blog posts, but it created a large amount of whitespace below the second call to action widget and above the footer area. What I wanted to do was conditionally remove the “inner” wrap on the home page only.

    I tried:

    if ( is_home() ) {

    /** Add support for structural wraps */
    add_theme_support( ‘genesis-structural-wraps’, array(
    ‘header’,
    ‘nav’,
    ‘subnav’,
    ‘footer-widgets’,
    ‘footer’
    ) );

    }

    else

    {

    /** Add support for structural wraps */
    add_theme_support( ‘genesis-structural-wraps’, array(
    ‘header’,
    ‘nav’,
    ‘subnav’,
    ‘inner’,
    ‘footer-widgets’,
    ‘footer’
    ) );

    }

    But it always defaults to the else. It is as though it is not recognizing the home page as the home. So my questions:

    Is there a better way to conditionally remove the “inner” from the home page? If so, how?
    Why is my code defaulting to the else?

    The site is currently located at http://72.41.80.181/

    Thanks in advance for any help you can give!

    Mike

    #13583

    Diane Kinney
    Participant
    Post count: 30

    Mike, I don’t think this approach will work.  My understanding of the structural wrap function is it will pull divs out of the wrap, but not control whether they exist or not.

    This is technically not a best practice, but you can hide that div on the home page with this css:

    .home .minimum #inner {

    display: none

    }

    To be more technically correct, you would want to write code either in your functions file or your page template that removes that div, a bit more of an involved process.

     

     

     


    Need more help? Find me on Twitter @gidgetthegeek

    #24534

    sandy
    Participant
    Post count: 1

    Hi  There

    Please check my code it will work for you .
    if ( is_home() ) {
    add_theme_support( ‘genesis-structural-wraps’, array(
    ‘header’,
    ‘nav’,
    ‘subnav’,
    ‘footer-widgets’,
    ‘footer’
    ) );
    }

    elseif ( is_singular( array( ‘post’, ‘page’ ) ) && has_post_thumbnail() ){

    add_theme_support( ‘genesis-structural-wraps’, array(
    ‘header’,
    ‘nav’,
    ‘subnav’,
    ‘inner’,
    ‘footer-widgets’,
    ‘footer’
    ) );}

     

    Regards

    Sandeep

     

     

     

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

You must be logged in to reply to this topic.