Skip to content

Nav Menu Open Link in a new tab does not workΒ #72

@adrian200065

Description

@adrian200065

I love your nav menu code because it make it really simple to setup drop-down menu. However, "Open link in a new tab doesn't work" and I have spent hours trying to figure it out. If I disabled your menu code and revert to standard menu setup the "Open link in a new tab" works. I haven't card anything with the code except for the CSS. Do you have any suggestions?

I try this code $target= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ' target=”_blank" '; and then this to the anchor link but it is opening all the links into a new tab. I just need to open links that I set in the menu open to option to open in new tab.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions