How can I make a div box with "id=private" that is inside a post only visible to the author of the post?
I made it for the admin, but I want the id to be visible only to the author of the post.
Example:
If the author is logged in, he should see the content with id=private.
but
if another user is logged in, he should not see the content with the id=private.
My solution for admin:
/* hide role-specific div */
#privat {
display: none;
}
body.logged-in.admin-bar #privat {
/* Admin is logged in*/
display: flex;
}