WordPress.org

Ready to get started?Download WordPress

Forums

Linking to an ID within an article (3 posts)

  1. ClaudiuCC
    Member
    Posted 5 months ago #

    trying to interlink, but wordpress seems to complicate it.
    after publishing the code below with the text tab (NOT the visual tab, the other one), wordpress returns in the source code of the article a twiked version of what i've published initialy.

    below is what i've published in the backend

    <li><a href="#food">link to Food Stuff</a></li>
    <h2 id="food">Food Stuff</h2>

    below is what i can see in the frontend, in the source file

    <li><a href="#food">link to Food Stuff</a></li>
    <h2 id=\"food"\>Food Stuff</h2> ... notice here the slashes

    this tweak that wordpress did automatically makes the links open a new window with the root page.

    i would like the user experience to NOT open a new tab, but to jump to the text passage.

    your help would be much appreciated

    Later Edit:
    after googling i've found the reason why this happens and the explanation is here

    Now what i need is a solution around it ...

  2. graphical_force
    Member
    Posted 5 months ago #

    Can you post a link to where this is happening?

  3. ClaudiuCC
    Member
    Posted 5 months ago #

    problem solved.
    thank you graphical_force for your input.

    the problem was coming from a plugin that was meant to open external links in a new tab; so it would add up a target=_blank to all urls.
    luckly i saw this in the source code early.

    apparently the plugin has a bug as it was also opening internal links in new tab.

    for those having same issues, if you are unsure on whether your website is misbehaving or it's a general wp.org update bug, you can always check your website against the wp.com one to see where the bug is. (having in mind the fact that wp.com is always up to date).

Reply

You must log in to post.

About this Topic