IF IS post author/editor show content – ELSE hide
-
hi to community,
i have twirl my brain all day to find how i can show a button or something else inside a loop (single.php) if the logged in user is the author of the post.
i have try all the conditional tags in the documentation…but with no luck…
now i try this:
<?php global $current_user; get_currentuserinfo(); if (is_user_logged_in() && (current_user_can('edit_posts') || $current_user->ID == $post->post_author) ) { echo 'button or something'; } ?>
but with this every logged in member can see the “button or something”,
does anyone know how i can do this?
thanks a lot,
Philip
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘IF IS post author/editor show content – ELSE hide’ is closed to new replies.