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

    Hello,

    I need to get some information (HTML/Text) beneath the opened flyout menu.
    I s there a chance to edit a template or can I put a bshortcode there etc.?!

    Thanks for help!

    #1092992

    Hey alexbay,
    Sorry for the late reply, one way to add some text into the burger menu is to create a menu item with a custom class and only show it for screens smaller than 768px or mobile displays. Please read more here.
    Or if your html/text is already on your page somewhere, you can add it to your burger menu with jQuery. But we will need to see your site to find the correct elements. Please read more here.
    Or you can add a widget area inside of your header and hide it for desktops. Please read more here. But we’ll also need to see your site.
    Please let us know if you would like some help with one of these methods.

    Best regards,
    Mike

    #1093715

    Hey Mike, thanks for your answer.

    The website is still in development but I am trying to figure out where all the content can be displayed.

    I want the (e.g.) address to be placed beneath the last menu item on the fly-out-menu (“Contact”, in this case).

    A widget that I can can be easily changed would be nice to be placed there.
    Is it possible that it also appears on mobile devices, just beneath the menu?
    Thanks, Alex

    #1093789

    Hi,
    I tested this out on my localhost and found that if you create a widget area with this function in your functions.php you will get a widget under your menu:

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

    Besure to add a custom widget called “header” in your widgets.
    Then if you add this css it will be hidden:

    .inner-container > #text-6 {
    display: none !important;
    }

    Then if you add this javascript the widget will be added to your mobile menu on click, it can not be on “page load” because the menu doesn’t exist until “click”:

    function widget_burger_menu(){
      ?>
      <script>
    (function($){
    $(window).click(function(){
      $( "#text-6" ).appendTo( "#av-burger-menu-ul" );
      });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'widget_burger_menu');

    Please note my widget had the ID of #text-6
    your will be different, so just match the ID of the widget.
    Then clear your browser cache and check.
    Please let us know if you want a hand with this.

    Best regards,
    Mike

    #1093892
    This reply has been marked as private.
    #1093981

    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 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Custom Content beneath opened sidebar flyout menu’ is closed to new replies.