Archived topic
how to insert your hook into a submenu.
4 replies · Started by detanatar on July 29, 2022
1) how to insert your hook(elemenf block) into a submenu.
so that each menu item has its own hook(elemenf block) in the submenu
2)why the element (block) is inserted after_main_content is normal - (example after 111111),
and custom_hook is wrong (example after 000000)
1)
probably did not quite correctly approach the solution of the problem of the menu and the user hook.
It was necessary to solve the problem somehow by creating your own menu in the code and adding hooks to it.
<ul>
<li><a href="/">main</a></li>
<li>theme<li>
<div> [hooky_shortcode]</div>
</li>
<li><a href="/sitemap">page-1</a></li>
<li><a href="/contact">Page-2</a></li>
</ul>
I thought there was already a solution for the theme menu as well.
Hi there,
1. There are no hooks inside the Menu items, so your Shortcode or other custom solution would be required.
2. Make sure you use a Shortcode Block when adding the shortcode to your page, NOT the HTML Block
1)
I will make my menu code
2)
Thanks
I added shortcode as text
Glad to hear that!