This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Custom layout, with banner and transparent header, unwanted padding, v2.0.0

  • Creator
    Topic
  • #23562
    Noah Kuhn
    Participant

    Hi, there.

    Working on a new site and I’ve run into an odd issue. When using a custom template, alongside a page banner, with the transparent header option enabled, my first “element” of the custom section gets a bunch of padding added to it which pushes it down the page. Perhaps this is fixed in one of the new versions of Jumpstart?

    #custom-main > .section_primary gets an extra 178px of padding on top, which I assume is custom to my specific template sizes.

    http://s9.postimg.org/5u7oa3mjz/Screen_Shot_2015_10_17_at_2_47_32_PM.png

    Am I doing something wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #23569
    Jason Bobich
    Keymaster

    Hello Noah,

    Apologies for the delayed response today. I wanted to make sure I was on top of the issue before I reported back on this topic.

    The reason this issue occurs is because originally I didn’t intend for people to combine using a banner and a custom layout on the page together. My original intention was that if someone used a custom layout, they’d be accomplishing the idea of a banner through elements of the custom layout.

    So, keeping this is mind, you’ll notice that both the page banner and first section of the custom layout get the extra 118px of padding, which accounts for the height of the header — i.e. on a custom layout you have 118px (header) + 60px (original section top padding) = 178px.

    I’ve got this fixed in v2.0.3 of Jump Start, which won’t be posted for a little while, because I just posted v2.0.2. To fix for now, you can do what you’ve already done, which is just to override with your own CSS.

    Or, another way from your child theme’s functions.php (which is how I’m actually handling in the theme) is to bump the count of all the sections up by 1. This first section of the layout becomes the second section, as the banner is now acting as the first section. This way, the first section doesn’t trigger the extra padding.

    /**
     * If a page with custom layout has a banner above
     * content applied, bump the section start count from
     * 1 to 2. This way, the banner essentially becomes
     * the first section of the layout.
     */
    function my_builder_section_start_count( $count ) {
    
    	if ( themeblvd_config('banner') ) {
    		return 2;
    	}
    
    	return $count;
    }
    add_filter('themeblvd_builder_section_start_count', 'my_builder_section_start_count');

    Note: The filter themeblvd_builder_section_start_count for this to be possible was added in v2.0.9 of the Theme Blvd Layout Builder plugin.

    #23570
    Noah Kuhn
    Participant

    You’re the man Jason. I figured that was the issue, but thanks for the clarification. One note, I’ve had two inquiries via these forums and your responses have been consistently excellent. Doesn’t always happen in the web software world, so I want to thank you for your great work.

    Cheers.

    #23571
    Jason Bobich
    Keymaster

    Awesome, thanks! Glad to hear it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.