WordPress.org

Ready to get started?Download WordPress

Forums

Commenters' links opens in new window but the submit link remains in a iframe. (4 posts)

  1. Y8lime8
    Member
    Posted 9 years ago #

    I need help! The thing is, I want my commenters' links on that page to open in new windows but at the same time when you click on the submit link, IT opens in a new window also and I want that to remain in the iframe.

    So, commenters' links (on wp-comments.php) open in new windows when you click but at the same time the submit link doesn't open in a new window.. Does anybody has the code for that sort of thing??
    That's what I want. Thanks!

  2. BubsatSchool
    Member
    Posted 9 years ago #

    Open up /wp-includes/template-functions-comment.php

    Find:
    function comment_author_link()

    Replace this line:
    echo "<a href='$url' rel='external'>$author</a>";

    With this line:
    echo "<a href='$url' rel='external' target='_blank'>$author</a>";

    That should do the trick ;)

  3. Y8lime8
    Member
    Posted 9 years ago #

    thanks!

  4. BubsatSchool
    Member
    Posted 9 years ago #

    Your layout is gorgeous, btw :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.