-
Hi,
I have created a social icon element and I would like to put it inside my header primary menu toggle, in both desktop and mobile view.I have tried with each hook name but I cannot make it work: https://bifrutas.com/politica-privacidad/ (for the moment this is the only page where it’s vivislbe, until I can make it work properly)
What can I do?
Thank you in advance
-
Hi there,
if you want it inside the regular toggle menu drop down then it requires some custom work.
See my reply here:https://generate.support/topic/hook-area-in-default-mobile-menu/#post-65529
-
Thank you David,
I have followed the steps provided (see here: https://imgur.com/a/byLP5B2), but the block is not showing up…Is there something I am doing wrong?
-
Make sure you’re hook name is correct.
The syntax is as follows:gp_menu_hook-{menu-item-name}
And it looks like your menu item label was:
hook-menu-item
And so your Custom Hook needs to be:
gp_menu_hook-menu-item
-
I think the syntax is correct… My item label is “button” and my Custom Hook is “gp_menu_hook-button”.
That’s correct right? I have applied the exact same names used in the example (https://generate.support/topic/hook-area-in-default-mobile-menu/#post-65529) in order to reduce the probability of making a mistake, but it’s not working… -
My item label is “button” and my Custom Hook is “gp_menu_hook-button”.
You already have a menu item inserted after the “Mixterybox” menu item.
https://app.screencast.com/tgolDHxGS1j27I don’t see a menu item slug for the inserted menu item, how did you set up the menu item?
-
Hi Ying,
thank you for your support.You can see the menu item setup here: https://imgur.com/a/zlWqXNV
The added link is a custom link, with class=”gp_menu_hook” and label=”button”.
According to the code I had to add to my functions.php (https://generate.support/topic/hook-area-in-default-mobile-menu/#post-65529) I did not need a proper slug right?
What I need is the class and the label.
Or am I missing something?
Thank you again!
-
Alvind
Hi there,
When I inspect your site’s code, it seems like the hook is
gp_menu_hook-menu-item
. See here: https://postimg.cc/v16hyBmTMake sure you’re using the correct menu. You can also try using the hook
gp_menu_hook-menu-item
inside your elements to see if the menu shows up. -
Well, you were right Alvind!
Changing the hook name did the trick!
Thank you all for the amazing support!!
-
Alvind
Great to hear that!
- You must be logged in to reply to this topic.