• Heiio,

    I’m trying to make a popup JS widget a clickable link in my nav bar. I have the code, but since it’s not a URL, i’m finding it difficult.
    I tried putting it in a Custom Link in Menus, but it only takes URLs.

    Thanks for any help.

Viewing 1 replies (of 1 total)
  • Hi,

    As you noticed, you can’t add javascript there. You’ll need to use the wp_nav_menu_items filter to add a custom link to the menu. You can find some examples of those on WordPress StackExchange.

Viewing 1 replies (of 1 total)
  • The topic ‘Making a JS Widget code a clickable link’ is closed to new replies.