WordPress.org

Support

Support » Plugins and Hacks » Network Latest Posts » [Resolved] [Plugin: Network Latest Posts] How to add target=blank to post URLs?

[Resolved] [Plugin: Network Latest Posts] How to add target=blank to post URLs?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jose Luis SAYAGO

    @iluminatus

    Hello,

    Well, you could use jQuery for that, just add this to your theme’s header.php inside the <head></head> tags the code below:

    <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/nlp_extlinks.js"></script>

    Then create a new file called nlp_extlinks.js inside the js folder (if it doesn’t exist you can create one) inside your active theme’s folder, and put this inside:

    jQuery(document).ready(function(){
        jQuery('.nlposts-wrapper a').attr('target', '_blank');
    });

    That’s it, save and close. It will add the target=”_blank” to all links inside nlposts-wrapper.

    Cheers.

    Awesome support, Jose!

    Plugin Author Jose Luis SAYAGO

    @iluminatus

    Hey Mac, thanks for your comment. I’m glad to help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Network Latest Posts] How to add target=blank to post URLs?’ is closed to new replies.
Skip to toolbar