Tagged: x
-
AuthorPosts
-
April 13, 2016 at 8:43 am #880012
onefoursixParticipantre: laraboothairdressing.co.uk/home-page
How do we add images to the mega menu please? We would like to add an image above the various services when you hover over the hair menu button.
April 13, 2016 at 2:22 pm #880673
Prasant RaiModeratorHello There,
Thanks for writing in!
Would you mind providing a mockup? You can also walk-through following thread to implement images in mega menu:
https://community.theme.co/forums/topic/images-in-the-mega-menu/#post-159582
Let us know how it goes.
Thanks.
April 13, 2016 at 2:53 pm #880736
onefoursixParticipantMock up: http://laraboothairdressing.co.uk/wp-content/uploads/2016/04/Screen-Shot-2016-04-13-at-20.45.48.jpg
in the mockup, the red blocks are the images I want placing above each service on the mega menu. Can you provide the CSS and I will edit in each of the image urls.
Thanks
April 13, 2016 at 11:56 pm #881437
RupokMemberHi there,
Thanks for updating. Kindly follow this thread – https://community.theme.co/forums/topic/add-svg-images-to-mega-menu/
Hope this helps.
Cheers!
April 14, 2016 at 2:17 am #881641
onefoursixParticipantI would appreciate it if you could walk me through it please, as I am unsure how to add the svg code. When I tried it crashed the site and removed the menu.
Please walk me through it rather than refer me through to another post. Lazy support guys.
Need this asap too now….
April 14, 2016 at 5:50 am #881963
ZeshanMemberHi there,
You don’t need to enter complete SVG code in your menu label. Upload the SVG file in your site and then add it’s link to the menu using
<img>tag. So for example, add this code in your menu label (see: http://prntscr.com/as3nmq):<img src="URL_TO_YOUR_SVG_FILE">Replace URL_TO_YOUR_SVG_FILE with your SVG file URL .
Thank you!
April 14, 2016 at 6:14 am #881998
onefoursixParticipantI cant upload an SVG file. It throws up errors.
I have sorted it another way though. Please review the page and look.
However it is not working properly on mobile. When clicking to expand a menu it expands a totally different menu.
Can you advise pls.
April 14, 2016 at 12:24 pm #882720
RupokMemberHi there,
Thanks for writing back. Your current setup too complex to handle on mobile device. It seems you have an empty link before the image link that creating confusion. Let’s remove this and decrease the image size for mobile with this CSS :
.x-navbar .mobile .sub-menu li a img { width: 70px; }I can’t assure that it will look great but you can try.
Cheers!
April 14, 2016 at 2:45 pm #882958
onefoursixParticipantit hasnt worked. it is still bringing up the incorrect sub menu when using for mobile.
can you look into please? or at least give me the full walk through for putting the images on the mega menu properly pls?
April 15, 2016 at 1:00 am #883708
RupokMemberHi there,
Thanks for updating. Did you follow the reply carefully? I can still see the extra anchor tag on your menu item that you need to remove. See – http://prntscr.com/asfzl2
If the issue still persist, provide your WordPress login credentials in a private reply so that we could check your setup.
Cheers!
April 15, 2016 at 1:31 am #883739
onefoursixParticipantThis reply has been marked as private.April 15, 2016 at 8:40 am #884277
JackKeymasterHi there @onefoursix,
Thanks for writing in!
In the wp-admin > Appearance > Customize > Custom > CSS, add the following CSS:
body .desktop .x-nav .x-megamenu>.sub-menu>li { float: none; width:auto !important; display:inline-block; vertical-align:top; } body .masthead-inline .x-navbar .desktop .sub-menu { text-align: center; } body .x-navbar .x-container { position: static; }If you wanted to change to using the SVG approach where you add it as a navigation label rather than a separate custom link, first you’ll need to register the SVG mime type, by default in WordPress .svgs are disabled, to add support, you can add the following code to a child themes functions.php
function x_allow_svg_mime_type( $mimes = array() ) { $mimes['svg'] = 'image/svg+xml'; $mimes['svgz'] = 'image/svg+xml'; return $mimes; } add_filter( 'upload_mimes', 'x_allow_svg_mime_type' );Then you can go to your menu in the wp-admin > appearance > menus, remove the custom links with the images and just add
<img src="//wp-content/uploads/your-image.svg">to your navigation label.Thank you!
April 15, 2016 at 9:02 am #884315
onefoursixParticipantOK – i am getting rather annoyed by this now. You are obviously not properly testing this and it is starting to waste my time.
Attached is a screenshot of what your code has done to the site. Also – it STILL doesnt work properly on mobile.
Do you actually understand the issue in hand here?????
April 15, 2016 at 9:03 am #884317
onefoursixParticipantscreenshot viewable here – http://laraboothairdressing.co.uk/wp-content/uploads/2016/04/Screen-Shot-2016-04-15-at-15.01.28-2.png
April 15, 2016 at 10:10 pm #885194
Rue NelModeratorHello There,
Please edit your menu and make sure that you only add an image in the navigation label;
<img class="noLightbox" src="http://laraboothairdressing.co.uk/wp-content/uploads/2016/04/colour-menu.png" />Adding an
<a>tag will not help because it is invalid. You can nest an<a>tag. It will just be invalid and will create issues in your site like what is happening now. Try edit your menu and test it again especially in mobile screens.Please let us know how it goes.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-880012 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
