• Resolved carobina

    (@carobina)


    Hi, could anybody help me how to move the feature image into the header of each site, above the navigation? We have the premium version of GeneratePress, but it I’d be equally happy to try php and css.
    I’m from Germany, so I might not reply directly to posts because of the time delay.
    I’ve been trying and searching for two days and will be very obliged indeed for any help!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 16 through 21 (of 21 total)
  • Theme Author Tom

    (@edge22)

    It looks like the navigation CSS is commented out:

    /*.main-navigation {
        background: rgb(34, 34, 34) !important;
    }*/

    Can you remove the comments?

    As for the sticky navigation, we really aren’t supposed to support pro features in this forum, it goes against the www.ads-software.com rules. I’m not seeing any reason why it shouldn’t be working, though. The CSS you’ve added shouldn’t have any effect on it.

    Thread Starter carobina

    (@carobina)

    Yes, but I did the commenting after testing. Don’t want to have code hanging in there that does not do anything but may affect stuff later (I’m new to all that, didn’t know php before, so just being cautious).
    The transparency really does not react to anything.

    For the sticky nav: sorry, I can ask the person responsible for the webspace to give me access to the pro login, if you wish. Though I’m not sure if the problem is sitting in front of the computer (on my side) or if it is some kind of bug – seems very strange to me.
    Thanks for your help so far!

    • This reply was modified 4 years, 10 months ago by carobina.
    • This reply was modified 4 years, 10 months ago by carobina.
    • This reply was modified 4 years, 10 months ago by carobina.
    • This reply was modified 4 years, 10 months ago by carobina.
    Thread Starter carobina

    (@carobina)

    But before asking for the pro login, could you please help with the transparency problem? Or should I make that a new topic?
    I think they are connected: if I comment out the part

    .inside-navigation {
    margin-top: -55px;
    }

    both features work, the navigation bar color one as well as the stickyness of the navigation.

    But maybe there is a better way to tell the navigation the new place?

    PS: I uncommented the color part, just in case, and added opacity as well, with no luck

    .main-navigation {
    	background: rgba(34, 34, 34,1) !important;
    }
    • This reply was modified 4 years, 10 months ago by carobina.
    • This reply was modified 4 years, 10 months ago by carobina.
    • This reply was modified 4 years, 10 months ago by carobina.
    • This reply was modified 4 years, 10 months ago by carobina.
    • This reply was modified 4 years, 10 months ago by carobina.
    • This reply was modified 4 years, 10 months ago by carobina.
    Theme Author Tom

    (@edge22)

    Ah, using negative margin like that probably isn’t the best method.

    Instead, let’s move the navigation into the header with some PHP:

    add_filter( 'generate_navigation_location', function() {
        return 'custom';
    } );
    
    add_action( 'generate_after_header_content', function() {
        if ( function_exists( 'generate_navigation_position' ) ) {
            generate_navigation_position();
        }
    } );

    Then add this CSS:

    .site-header #site-navigation {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
    }

    That should fix everything ??

    Thread Starter carobina

    (@carobina)

    Wow, it worked! Magic ?? Thanks so much, really ??

    Theme Author Tom

    (@edge22)

    Awesome, glad we could get this working ??

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘use feature image above primary navigation’ is closed to new replies.