WordPress.org

Ready to get started?Download WordPress

Forums

Link Library Plugin - How to Open Links in New Windows? (9 posts)

  1. Zhikang
    Member
    Posted 5 years ago #

    I am a total newbie to blogging, programming and WP. Just set my blog 1 week ago
    After searching the forums and knowledgebases on the plugin "link library" by Yannick Lefebvre i was very happy with the features. Both the WordPress Forum and the Plugin Website helped to solve all issues on the installation and setup.
    However, there is still NO HINT on HOW TO OPEN THE LINKS in a new window.
    Maybe it is just a very tiny thing - but I cannot solve it myself. Could anyone out there help please?
    Thanks, Zhikang.

  2. Edwin
    Member
    Posted 5 years ago #

    Hi Zhikang,

    The solution can be very simple, but at what moment do you want a link to open a new window.
    Is it when you're writing a post and adding a link. When I look at your blog I see you have no problems with that.

    When you want to change your theme files you can add target="_blank" to the link. For example: <a href="http://www.targetpage.com" target="_blank">link</a>

    This is basic HTML not something specific to WordPress.

  3. Edwin
    Member
    Posted 5 years ago #

    ignore this post

  4. Zhikang
    Member
    Posted 5 years ago #

    kingbolo. Thanks for your quick reply! I want to open the link in a new window when I click on the link created by the Link Library Plugin on my "Links" page. So to me it is not a general HTML code issue which I could have solved on my own. It is about how to access the code of the plugin to tune it up a bit. Can anyone help?

  5. Zhikang
    Member
    Posted 5 years ago #

    In WordPress admin we can define the "target" section of a link - i.e. open in a new window. But the Link Library plugin does not retrieve this link property. Is there a way to do it?

  6. Yannick Lefebvre
    Member
    Posted 5 years ago #

    Good feedback. I am actually surprised that no one ever asked me about this before. I will investigate tonight if I can just query the WordPress admin setting. Or I might just add my own setting. Stay tuned for an update in the next few days to handle this.

    Yannick

  7. Yannick Lefebvre
    Member
    Posted 5 years ago #

    I looked at the code for Link Library and it does retrieve the "target" section defined for a link. I also ran a quick test, setting the target to "newWindow" and this opened a new window when I clicked on that link.

    Now, that being said, I think that it might be useful to have a way to globally set the target instead of having to do it on every single link. Perhaps setting a default target for link where the user does not define one. I will implement this tonight.

  8. Yannick Lefebvre
    Member
    Posted 5 years ago #

    Version 1.2.5 adds a new option to set a default target.

  9. Zhikang
    Member
    Posted 5 years ago #

    Yannick, thank you so much!

    This is my first website using WP and Thesis .... started reading about this stuff only 10 days ago ...
    This is my first public question in a forum.
    The first solution - from the devleoper himself. And an instant update on the plugin over night!

    Great work!

Topic Closed

This topic has been closed to new replies.

About this Topic