could it possible to hide / exclude author (admin) name in posts ?
only post written by admin not authors
i tried but it's not work
<?php the_author_posts_link($exclude_admin); ?>
could it possible to hide / exclude author (admin) name in posts ?
only post written by admin not authors
i tried but it's not work
<?php the_author_posts_link($exclude_admin); ?>
You can do something like this:
<?php $getid = $posts[0]->post_author; if($getid == 1){ ?>
/* DISPLAY ADMIN NAME BUT NOT LINK TO AUTHOR PAGE */
Published by <?php the_author(); ?>
<?php } else { ?>
Published by <?php the_author_posts_link(); ?>
<?php } ?>
Or, if you don't want to display name
<?php $getid = $posts[0]->post_author; if($getid == 1){ ?>
<?php } else { ?>
Published by <?php the_author_posts_link(); ?>
<?php } ?>
Note id == 1 its default admin ID.
This topic has been closed to new replies.