Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1124286

    Trying to add two widgets to header – Header Layout: Widget left, Logo center, widget right, menu below

    Following;

    and

    It only added one area on theft and I don’t know how to control it’s display.I’ve attached screenshot of what I’m trying to do.

    #1124319

    Hey hostworks,

    Did you add two widget areas? If so then please add something to both of them so that we can target them with CSS:

    add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( 'header1' );
    dynamic_sidebar( 'header2' );
    }

    Best regards,
    Rikard

    #1124797

    I added the following, as I want the two items in the main menu linee on opposite sides of the logo.

    add_action( ‘ava_main_header’, ‘enfold_customization_header_widget_area’ ); function enfold_customization_header_widget_area() { dynamic_sidebar( ‘header1’ ); dynamic_sidebar( ‘header2’ ); }

    #1125004

    Hi,

    Please try the following in Quick CSS under Enfold->General Styling:

    #text-5 {
        position: absolute;
        left: 0;
    }
    #text-6 {
        position: absolute;
        right: 0;
    }

    Best regards,
    Rikard

    #1125178

    ok, thanks. now how do I push them closer to the center logo, like the sample?

    #1125181

    Ok, I added the following, which fixed the desktop, but it messes up the mobile, see below

    #text-5 {
    position: absolute;
    margin-left: 22em !important;
    left: 0;
    }
    #text-6 {
    position: absolute;
    margin-right: 22em !important;
    right: 0;
    }

    #1125386

    Hi,

    You can add specific CSS for mobile devices by using media queries:

    @media only screen and (max-width: 767px) {
    #text-5 {
    position: absolute;
    margin-left: 22em !important;
    left: 0;
    }
    #text-6 {
    position: absolute;
    margin-right: 22em !important;
    right: 0;
    }
    }

    Best regards,
    Rikard

    #1125397

    ok. doesn’t make any difference. I may just want those two widgets to go away on mobile.

    #1125547

    Hi,

    Ok, add this instead then to hide them on mobile devices:

    @media only screen and (max-width: 767px) {
    #text-5, #text-6 {
    display:none;
    }
    }

    Best regards,
    Rikard

    #1125577

    Fantastic, thanks.

    #1125628

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘trying to add two widget ares’ is closed to new replies.