WordPress.org

Ready to get started?Download WordPress

Forums

Open sidebar links in a new window (4 posts)

  1. WhitePhantom
    Member
    Posted 3 years ago #

    Hi,

    I've created a Links category and added links to a few external websites to it. I want these websites to open in a new window (target="_blank") but I can't see how to make just these links do that - I don't want any other links on the site to open in a new window.

    I tried adding the target="_blank" on the Web Address line after the website address, but it doesn't add it as a property of the anchor tag - it just appends it to the href.

    How do I do this?

    Thanks,
    WP.

  2. WhitePhantom
    Member
    Posted 3 years ago #

    Hi,

    Anyone know how to do this?

    Thanks,
    WP.

  3. Alx
    Member
    Posted 3 years ago #

    Are you adding the links via the "Links" section in your dashboard and then using a links widget in the sidebar?

    When you add a new link (http://YOURSITE.COM/wp-admin/link-add.php,) you're given the option to specify the target of that particular link (_blank, _top, or _none)

    The other option you have would be to use a text widget in the side bar and then add each link manually with a _blank: <a href="http://NEW WINDOW.com" TARGET="_blank">a new window</a>

  4. WhitePhantom
    Member
    Posted 3 years ago #

    Thanks Alx, I don't know what I was at that I didn't see that...

    D'oh!

    Sorted now anyway. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic