• Hi.

    I have just created a website with Elementor (Astra theme) and now that it’s published, I noticed that every link opens in a new tab when visiting the website. I have tried everything (checkboxes in the customization and change things in the menu-settings but nothing seems to work). Maybe someone can help me with the issue? I want all the links in the menu open normally within the same window and tab.

    Thanks,

    Andy

    • This topic was modified 1 year, 10 months ago by antcap.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • I see, it looks like the issue is caused by the way the menu is set up in the Astra theme. By default, Astra adds the target=”_blank” attribute to all menu links. To change this, you can use the following steps:

    1. Go to Appearance > Menus in your WordPress dashboard.
    2. Click on the menu that you want to edit.
    3. Click on the menu item to expand it.
    4. Uncheck the “Open link in a new tab” checkbox.
    5. Click on the “Save Menu” button to save the changes.

    Alternatively, you can use a plugin like “Menu Target” which allows you to set the target attribute for all menu items.

    You can also edit the code, you can find the menu template in the Astra theme, and remove the target=”_blank” attribute from the anchor tag.

    Please let me know if this helps or if you have any questions.

    https://wpgenius.tech/

    Thread Starter antcap

    (@antcap)

    Unfortunately I tried this menu-thing already and all menu items were already unchecked. Also couldn’t find the plugin you mentioned.

    Ramona

    (@nextend_ramona)

    Each of your links contains the following attribute: data-wpel-link which seems to be related to this plugin:
    https://www.ads-software.com/plugins/wp-external-links/

    Looking at its screenshots it has an option to make all internal links open in a new tab. So I recommend making sure that no internal links are set to open in a new tab at this plugin’s settings.

    Thread Starter antcap

    (@antcap)

    Thank you so much to both of you for helping to figure this out, this tip worked like a charm! ??

    • This reply was modified 1 year, 10 months ago by antcap.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Almost every link on my site opens in a new tab’ is closed to new replies.