Title: Making a JS Widget code a clickable link
Last modified: August 30, 2016

---

# Making a JS Widget code a clickable link

 *  [justinmarine](https://wordpress.org/support/users/justinmarine/)
 * (@justinmarine)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/making-a-js-widget-code-a-clickable-link/)
 * 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)

 *  [John Parris](https://wordpress.org/support/users/mindctrl/)
 * (@mindctrl)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/making-a-js-widget-code-a-clickable-link/#post-6628658)
 * 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.

## Tags

 * [link](https://wordpress.org/support/topic-tag/link/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [John Parris](https://wordpress.org/support/users/mindctrl/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/making-a-js-widget-code-a-clickable-link/#post-6628658)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
