showing only author category
-
hello!
is it possible to filter the author’s name exibition by category ‘author’ only? – in the snippet below
i have also editors, and don’t want them being displayed.<?php if (function_exists('publishpress_authors_get_post_authors')) {
$post_id = get_the_ID();
$post_authors = publishpress_authors_get_post_authors($post_id);
foreach ($post_authors as $post_author) {
$first_name = $post_author->first_name;
$last_name = $post_author->last_name;
echo "$last_name, $first_name ";
}
}
?>i have multiople authors. the result expected should be as using the shortcode:
[publishpress_authors_box author_categories=”autor”]
but i do need it to be shown as in the snippet above, meaning:
css customizable ‘last name’ first;
then ‘first name’
thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.