Display a message in single if the post isn't from admin
-
Hello,
I’m trying to make an extra advice when the single post isn’t from the author admin. I already tring some things, but didn’t work.
I tried something like this:
<?php if (is_author('1')): ?> <div> --content-- </div> <?php else: ?> <div> --content 2-- </div> <?php endif; ?>
This have to be placed before the “
the_content
”
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Display a message in single if the post isn't from admin’ is closed to new replies.