• Resolved ironfish2

    (@ironfish2)


    Hi,
    This is a great plugin.

    As a feature request, could you consider adding a setting to open links in new tabs/pages? ie target=blank…..

    I have an instructional website where people need to go from one page to the next, and if the click a related link, it will take them away from the page and they will lose their place….

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi, this sounds like a good idea. I added it to the todo-list.
    There are some things that are waiting for this plugin. I hope to get around it soon.

    I just installed the plugin – and my first thougth: how to open the links in new window / tab, i.e. target=_blank.

    Thanx

    Thread Starter ironfish2

    (@ironfish2)

    @marcel – thanks for your consideration ??

    PS I just left a review at https://www.ads-software.com/support/topic/great-plugin-because/

    Plugin Author Marcel Pol

    (@mpol)

    Hi again…
    I thought about this, but I don’t think it is a good addition for most people.

    What is possible now with 2.3.0 is to add a JavaScript event to the related posts (they have better classes) and add an attribute to it. With jQuery this can be done relatively simple.

    Thread Starter ironfish2

    (@ironfish2)

    I appreciate your consideration of this.

    Just to be clear, you dont think it is a good addition to make a setting (option) to open in new window, or not good to automatically by default do this?

    If there was an option, and the default setting was not to open in new window, would that not suit most people?

    I have no skill in JS or Jquery at all….

    Plugin Author Marcel Pol

    (@mpol)

    Thank you.
    I understand your need for this too.
    I just think that adding an option for every usecase someone has can be a wrong approach. Your usecase is quite specific and can be easily solved in other ways.
    You could add JavaScript like this (tested, it works with 2.3.0):

    jQuery( document ).ready( function() {
    	jQuery('ul.related-posts a').attr('target','_blank');
    });

    Not sure what an easy way is to add this to your theme. You could look into the wp_enqueue_script function.

    Thread Starter ironfish2

    (@ironfish2)

    Thanks very much for the code ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Open links in new window’ is closed to new replies.