How can I create a div box with "id=secret" inside a post that is only visible to the author of the post?
I initially made it for the admin, but now I want the id to be visible exclusively to the post's author.
For instance:
If the author is currently logged in, they should have access to the content within id=secret.
Alternatively,
If another user is logged in, they should not be able to see the content assigned to id=secret.
This was my previous approach for the admin:
/* hide role-specific div */
#privat {
display: none;
}
body.logged-in.admin-bar #privat {
/* Admin is logged in*/
display: flex;
}