Support » Everything else WordPress » Show button for post author only

  • Hello I have a website that each user makes a post,
    but I wanted to make a button for the user to modify the post…
    but I want you to show this button, just to the author of the post… how to do it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You have to add a condition, so that you can check if logged in user is author of the post:

    if( is_user_logged_in() && is_author(get_current_user_id()) ) {
    //Do something...
    Thread Starter flavinholiveira


    @ a2hostingrj ok. mas aonde eu adiciono este código? eu nao sei!! rsrs

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show button for post author only’ is closed to new replies.