Skip to main content
Change title to better reflect the resultant code
Link
Pete
  • 1k
  • 1
  • 14
  • 39

Conditional: IF current user has NOT commented on current post (not including post author)

Spelling, formatting
Source Link
Dave Romsey
  • 17.9k
  • 11
  • 55
  • 70

I'm trying to find a way to have a conditional snippertsnippet in my single.phpsingle.php where //do something//do something happens if the current user has not commented on the current post.

I'm hopeless at coding but I'm guessing I need some of this...

is_user_logged_in()

$user_id = get_current_user_id()

The comment part baffles me... would this help? https://wordpress.stackexchange.com/questions/137799/how-to-limit-users-to-one-comment-per-post

I'm trying to find a way to have a conditional snippert in my single.php where //do something happens if the current user has not commented on the current post.

I'm hopeless at coding but I'm guessing I need some of this...

is_user_logged_in()

$user_id = get_current_user_id()

The comment part baffles me... would this help? https://wordpress.stackexchange.com/questions/137799/how-to-limit-users-to-one-comment-per-post

I'm trying to find a way to have a conditional snippet in single.php where //do something happens if the current user has not commented on the current post.

I'm hopeless at coding but I'm guessing I need some of this...

is_user_logged_in()

$user_id = get_current_user_id()

The comment part baffles me... would this help? https://wordpress.stackexchange.com/questions/137799/how-to-limit-users-to-one-comment-per-post

Source Link
Pete
  • 1k
  • 1
  • 14
  • 39

Conditional: IF current user has NOT commented on current post

I'm trying to find a way to have a conditional snippert in my single.php where //do something happens if the current user has not commented on the current post.

I'm hopeless at coding but I'm guessing I need some of this...

is_user_logged_in()

$user_id = get_current_user_id()

The comment part baffles me... would this help? https://wordpress.stackexchange.com/questions/137799/how-to-limit-users-to-one-comment-per-post