• Is there a way to disable the linking of URLs to names in comments?

    I’m creating a blog for a church youth group, and the URLs are causing problems when they’re filled out with links to “problem” pages. I can go through and wipe the URLs manually, but this would make my life easier.

    (PS: I tried searching already posted questions, and didn’t find anything relevant using “disable” “URL” and “comment.” If I just need a different search term, please let me know.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • In your wp-includes/kses.php, comment out the anchor tag from the allowed list i.e.
    /*'a' => array(
    'href' => array(),
    'title' => array()
    )*/,

    The advice above makes link tags not allowed in the comment *text*.
    I thought you meant that the name of the writer of a comment is linked and you want it to be just plain text? If that’s the case, replacing comment_author_link() or comment_author_url() or similar (in the comments template) with comment_author() (php tags around, of course) should help

    Thread Starter RobCarr

    (@robcarr)

    That was the answer to a question I didn’t know to ask!

    I’ve done that now, but it doesn’t solve the original problem, which I must not have described well.

    I think what I need to do is replace the

    <?php comment_author_link() ?>

    in the /wp-content/themes/default/comments.php module with something that just gives me the author name. Is there a

    <?php comment_author() ?>

    function (or something like it that would only give me the name of the author of the comment) that I could use?

    Rob

    Thread Starter RobCarr

    (@robcarr)

    Oops. I got interrupted and by the time I hit the send button, the answer was already there!

    Thanks!

    Rob

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disabling URLs in comments’ is closed to new replies.