if statement for get_the_author
-
Hello guys,
I want to modify my WordPress site to allow only authors to reply to comments posted in the post they have written. The way I plan on doing this is to edit this file and function: wp-includes/comment-template.php
function comment_reply_link($args = array(), $comment = null, $post = null) { echo get_comment_reply_link($args, $comment, $post); }This is what I’ve managed to edit so far:
function comment_reply_link($args = array(), $comment = null, $post = null) { $author = get_the_author(); if($author==1) { echo get_comment_reply_link($args, $comment, $post); } }At the moment it’s not really working but I think I’m on the right way, right? I’d really appreciate if someone could give me a hand with this.
Thanks,
John
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
The topic ‘if statement for get_the_author’ is closed to new replies.