Viewing 14 replies - 1 through 14 (of 14 total)
  • moshu

    (@moshu)

    paradoxdruid

    (@paradoxdruid)

    There’s a plugin to do this for Comments, Blank Target Comments.

    I added 3 or so lines to the plugin for my theme, Springer, to add the functionality to posts as well. If you like, you are welcome to strip the plugin out of my theme and use it.

    Thread Starter hoshi

    (@hoshi)

    Thanks Paradox,but,just where can i find this plugin?? ??

    Thread Starter hoshi

    (@hoshi)

    Your plugin Paradox is only for comments,i need this same plugin but only for posts links! ?? Nobody can help me? ??

    paradoxdruid

    (@paradoxdruid)

    As I stated in my first post (though perhaps unclearly), the version of the plugin included in my Springer theme contains code to add target=_blank to posts as well. The normal version I linked does not add target=_blank to posts.

    Hope that clears things up!

    paradoxdruid

    (@paradoxdruid)

    weird… when I post from Konqueror, it keeps double-posting. Ignore this post!

    Thread Starter hoshi

    (@hoshi)

    I have already seen this script,but,i can’t use it, because it open ALL links of my blog in a new page! I need a plugin that it opens in a new page only posts links ?? Thanks for the patience!

    Thread Starter hoshi

    (@hoshi)

    Paradox,can you explain me your script? I don’t understand how using it,thanks a lot!!

    Thread Starter hoshi

    (@hoshi)

    I have resolved! ?? Under you can find the solution:

    Open Admin –> Quicktags

    Line 395

    Replace this:

    with this:

    and,when you insert the link,the blank tag is automatically added! ?? Try it and tell me how work it!! ??

    paradoxdruid

    (@paradoxdruid)

    Glad you found a solution, Hoshi!

    The relevant part of the plugin I provided is below, if you were curious:

    add_filter ('the_content', 'wp_pd_blanktarget');
    this tells WP to apply the function wp_pd_blanktarget to the content of posts

    function wp_pd_blanktarget( $text ) {
    $text = preg_replace('|<a>|i', '</a><a>', $text);
    return $text;
    }

    This function adds target=_blank to links in the post.

    Thread Starter hoshi

    (@hoshi)

    I have resolved! ?? Under you can find the solution:

    Open Admin –> Quicktags

    Line 395

    Replace this:

    with this:

    and,when you insert the link,the blank tag is automatically added! ?? Try it and tell me how work it!! ??

    Sorry for double post! :\

    Thread Starter hoshi

    (@hoshi)

    Uff,i can’t post the code! ?? Sorry! Thanks however Paradox! ??

    Hoshi, where is the code, its sucks that I can’t see it in this post.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Blank target links automatically in the posts…’ is closed to new replies.