[Resolved] Page Hero Not Scaling

Home Forums Support [Resolved] Page Hero Not Scaling

Home Forums Support Page Hero Not Scaling

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2264357
    John

    Hi!

    Re: https://origami33stg.wpengine.com/

    I have a page hero image on this site that is cut off on the left and right, so the full image isn’t seen.

    I added a home-hero class and CSS, but no luck.

    ———————
    Original image dimension in px: w:1550 h:292

    Aspect ratio: 292 / 1550 = 0.1883870968 x 100 = 18.83
    ——————–

    Simple CSS:

    .home-hero {
        min-height: 19vw;
    }

    Thanks!

    John

    PS: Caches Cleared

    #2264462
    Leo
    Staff
    Customer Support

    Hi there,

    Background images aren’t responsive by nature – it isn’t something the theme can control.

    If you are trying to replicate this site here: https://www.origamispirit.com/

    Then that image should be added as the site logo in the customizer:
    https://docs.generatepress.com/article/adding-header-logo/

    #2275107
    John

    Hi Leo,

    I added the image as the site logo in the customizer. That works perfectly for a logged-out user.

    What if I wanted to change that site logo/image for a logged-in user?

    How is that done?

    Thanks!

    John

    #2275171
    Ying
    Staff
    Customer Support

    Hi John,

    You can try this filter:

    add_filter( 'generate_logo', function( $logo ) {
        if ( is_user_logged_in() ) {
            return 'URL TO ENGLISH LOGO';
        }
    
        return $logo;
    } );

    Replace the URL TO ENGLISH LOGO with the logo URL that you want to show for logged-in users.

    #2275229
    John

    Thank you, Ying!

    #2275258
    Ying
    Staff
    Customer Support

    You are welcome 🙂

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