WordPress.org

Ready to get started?Download WordPress

Forums

Related Links
Adding a Target to custom links (3 posts)

  1. andychurchill
    Member
    Posted 11 months ago #

    Some uses may want to optionally set a target on custom links. Any chance this feature could be added?

    I've made a modification to this plugin on the website I'm using it in to allow a target to be set on custom urls, though I've just made it a text field with a placeholder of "_blank" as a hint. But I could you could change this to a checkbox if it's only going to be same window or _blank.

    Also, rather than set target attribute, the checkbox could set a class of "external" on the link through which to hook some jQuery that actually opens in a new window, for accessibility purposes.

    If you think something like this is a good idea, but don't have the time to implement it, I don't mind forking and issuing a pull request if you want to include any change I made back into the official plugin.

    http://wordpress.org/plugins/related-links/

  2. DBZEROONE
    Member
    Posted 10 months ago #

    I'd love this feature added as well!

    Andy, any chance you could share your modified code?

  3. wsmout
    Member
    Posted 10 months ago #

    i'ld like to add a thought to this one. Indeed: a checkbox to indicate _blank taget would be nice.
    Alternatively: it seems fair to assume that custom links are external and should be opened in a new window (_blank target), whereas the other links are internal and therefore should be opened in the same window. If you automate this, you don't need a checkbox, right?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.