Site logo

Archived topic

Add custom code to secondary nav bar

3 replies · Started by Camilo Luna on July 29, 2022

Viewing posts 1–4 of 4

Hi there,

It looks like you can use a shortcode as well, in that case, add the shortcode to a hook element, and tick the execute shortcode box.
https://wpml.org/documentation/related-projects/woocommerce-multilingual/multi-currency-support-woocommerce/#currency-switcher-shortcode

If you have to use PHP code, do the same, but tick the execute PHP box instead. Wrap the code with <?phpand ?>

Here's a GP hook visual guide:
https://docs.generatepress.com/article/hooks-visual-guide/

Hi @Ying,

Sorry for the late reply. I finally was able to come back to this project and successfully used the generate_inside_secondary_navigation hook for what I needed. From the image in the hooks page I first wrongly assumed the action happened before the secondary navigation, but from the name it actually was inside.

Thanks again!

You are welcome :)

This archived topic is closed to new replies.