• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Conditionally Set Header Height on Portfolio Pages

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Conditionally Set Header Height on Portfolio Pages

This topic is: resolved

Tagged: custom header background

  • This topic has 4 replies, 4 voices, and was last updated 10 years ago by jacobgoh101.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • November 13, 2015 at 9:37 am #171002
    bisonbrah
    Participant

    Currently my custom header image is getting reduced from 1920x350 > 1920x130 due position: absolute in .site-header.

    How would I conditionally tell the .site-header to set min-width to 350px to accommodate the full height of the custom header
    thus the .backstretch should inherit the new height of 350px (I think...)?

    Any help would be fantastic!

    Manually Changing to 350px
    Default header size

    http://sscreativestudio.com/portfolio/balpark-media/
    November 13, 2015 at 10:56 am #171013
    Porter
    Participant

    What do you mean by "conditionally", on certain pages? If you want it changed in general, that wouldn't really be conditionally, that would just be changed.

    Additionally, please link to your site or state the theme so we can take a look.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    November 13, 2015 at 11:04 am #171014
    bisonbrah
    Participant

    Reference this url http://ssstudios.wpengine.com/portfolio/balpark-media/

    I mean conditionally as in if post (in this case a portfolio project) has

      extender_has_label('portfolio')

    then set .site-header to a height of 350px. I believe if .site-header is set to 350px then the .backstretch will inherit the same size....

    Any clearer?

    November 13, 2015 at 11:49 am #171019
    KevinPowell
    Member

    position: absolute; is simply the last thing in a big line of code, it isn't effecting the size of area.

    Part of the reason the height of the header is changing, is that your navigation goes from being on the right of your logo to underneath your logo when the screen gets smaller.

    While I was playing around on your site, it seemed to change over to a coming-soon page.... that said, it's using Backstretch, which is a JavaScript plugin which dynamically resizes background images.

    For me, the behaviour is a good thing because it keeps the navigation menu vertically centered in that space.

    November 13, 2015 at 7:27 pm #171055
    jacobgoh101
    Member

    Not sure if I understand your problem properly,
    but the way i used to modify CSS on only a certain post type is through using wordpress conditional tag

    https://codex.wordpress.org/Conditional_Tags#A_Single_Page.2C_a_Single_Post.2C_an_Attachment_or_Any_Other_Custom_Post_Type

    something similar to this works for me (put in functions.php)

    add_action( 'woocommerce_before_main_content', 'remove_product_image_from_composite', 1 );
    function remove_product_image_from_composite(){
    if ( is_single( array( 221,228 ) ) ) {
    echo "<style>
    .woocommerce div.product div.summary, .woocommerce-page div.product div.summary{
    width:100%;
    }
    .product_meta{
    display: none;
    }
    .related.products{
    display:none;
    }
    </style>";
    }
    }

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble