Site logo

Archived topic

Thumbnails in mobile menu

5 replies · Started by mkjj on March 31, 2022

Viewing posts 1–6 of 6

Hi,

I would like to add small thumbnails to the items in the mobile menu so that the image is placed before the linktext. I could use the individual CSS classes for that. Would be an ok solution for this site, since we rarely change the menu items. However, I would prefer a more robust and universal solution. How would you do this? This could be a very useful feature for Generatepress in my opinion, don't you think?

Thank you, Mike

Hi Mike,

Actually you can add HTML to the Navigation Label field at appearance > menus.

For example, the navigation label would be:<img src="image-url">Home or <svg>svg code</svg>Home.

Then you can add CSS to style/hide the images.

Hi Ying,

thank you very much. Your approach would apply for both the mobile and the desktop navigation, wouldn't it? I could then hide the images for the desktop menu, but this wouldn't really make things easier. I just wanted to make sure that I didn't overlook anything that Generatepress already provides.

Mike

No, GP doesn't have any settings regarding this :)

I could then hide the images for the desktop menu, but this wouldn’t really make things easier.

In this way you won't have to give each menu item a custom class and write CSS for each one.

In this way you won’t have to give each menu item a custom class and write CSS for each one.

Well, all items already have a specific class by default. So, nothing do add here. But this is a matter of personal taste. Both methods are perfectly fine. However, this feature would be great for Generatepress.

Thanks for the support. Always very much appreciated! :-)

You are welcome :)
But I don't think GP will work on this feature, as the menus are handled by WordPress :)

This archived topic is closed to new replies.