Incorporating PHP into my current theme
-
Can anyone help me by telling me where I should be pasting this code in my theme? How could I incorporate this code into the plugin?
<?php
global $current_user;
$args = array(‘user_id’ => $current_user->ID);
$usercomment = get_comments($args);
if(count($usercomment) >= 1){
echo ‘disabled’;
} else {
comment_form();
}
?>I basically want the comment to not appear is usercomment <=1
The topic ‘Incorporating PHP into my current theme’ is closed to new replies.