WordPress.org

Ready to get started?Download WordPress

Forums

raindrops
[resolved] Open EACH menu link in new tab (3 posts)

  1. galapogosian
    Member
    Posted 4 months ago #

    I got a reply on my last question referring to opening menu items in a new window, which worked. As I updated the theme today, I found I had to go back and reinsert that code:

    <?php
    add_filter( 'nav_menu_link_attributes','nobita_add_attribute', 10, 3 );
    
    function nobita_add_attribute( $content,$item, $args ){
    
     $content['target']= '_brank';
     return $content;
    }
    ?>

    What I noticed though was that the code opens one new window and each additional item clicked refreshes that tab to the new content. What code do I need to make 5 clicked menu items open in 5 different tabs?

    Thanks.

  2. nobita
    Member
    Theme Author

    Posted 4 months ago #

    Hi galapogosian

    Try below ( for windows )

    Control + click link

    Thank you.

  3. nobita
    Member
    Theme Author

    Posted 4 months ago #

    Two weeks have passed since remained without reply, I will change to Resolved.

Reply

You must log in to post.

About this Theme

About this Topic