[Support request] Position primary navigation above left and center columns, but next to right.

Home Forums Support [Support request] Position primary navigation above left and center columns, but next to right.

Home Forums Support Position primary navigation above left and center columns, but next to right.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1123670
    Bob

    I’d like to position the main navigation below the header, above the left sidebar (on pages it appears on) and above main content area, but next to the right sidebar. In other words, the right sidebar would touch the header, but on the left, the nav would come below the header and content. The generate_before_main_content hook will let me get it to the top of the main content area, but that doesn’t help with having it extend through the left sidebar.

    I know this can be done through custom templates; for example, I could stick to content/right layouts and create my own left sidebar area in order to get the control I need. But I’m wondering if there is a better way to do it within GeneratePress?

    #1123946
    David
    Staff
    Customer Support

    Hi there,

    do you have a mockup / diagram of what you’re trying to achieve? As I am having trouble picturing this.

    #1123966
    Bob
    #1124070
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Give this PHP a shot:

    add_filter( 'generate_navigation_location', function() {
        return 'custom';
    } );
    
    add_action( 'generate_before_main_content', function() {
        generate_navigation_position();
    } );

    Let me know 🙂

    #1124563
    Bob

    That gets the nav into the top of the main center column (above About Us in the mockup) but I’d like it to span the left and center columns.

    #1124566
    David
    Staff
    Customer Support

    Can you link us to the actual site so we can see what CSS is now required.

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