• Resolved inelouki

    (@inelouki)


    Hi, I tried the search first, but couldn’nt find what I needed (English ist not my native language, and I don’t really know what term I should be looking for *sorry*)

    Here’s what I’d like to do: while I’m logged in as user x I would like to see which of my posts are private and which are public. I know I can see the difference on the “manage posts” page – but I would like to see it with each post when I “view site”

    I would either like to show different background colours or add a little “icon” for private posts – can this be done, and how?

    Thank you very much in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try some code like this:

    if ($post->post_status == 'private') echo 'an image';

    Could also be used to set a class or something:

    <div class="<?php if ($post->post_status == 'private') echo 'privpost''; else echo 'publicpost'; ?>">

    Thread Starter inelouki

    (@inelouki)

    Thanks a lot – this is exactly what I needed!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show status while logged in’ is closed to new replies.