-
AuthorPosts
-
April 18, 2019 at 5:56 pm #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!
April 21, 2019 at 1:27 am #1092992Hey 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,
MikeApril 23, 2019 at 6:32 pm #1093715Hey 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, AlexApril 24, 2019 at 2:34 am #1093789Hi,
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,
MikeApril 24, 2019 at 9:15 am #1093892This reply has been marked as private.April 24, 2019 at 2:34 pm #1093981Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Custom Content beneath opened sidebar flyout menu’ is closed to new replies.