I have seen threads on how to do this but they are impossibly long and confusing. Could you please provide the instructions? Thank you!
Hey williamslyd,
Thank you for the inquiry.
Please use the following filter in the functions.php file to append the author name to the grid items:
function avf_post_slider_meta_content_mod($meta_content, $entry, $index, $atts, $meta_array) {
$meta_author = '<div class="slide-meta-del">/</div>';
$meta_author .= '<div class="slide-meta-author">';
$meta_author .= __( 'Author:', 'avia_framework' ) . '<span> ' . get_the_author_meta('display_name', $entry->post_author) . '</span>';
$meta_author .= '</div>';
$meta_content .= $meta_author;
return $meta_content;
}
add_filter('avf_post_slider_meta_content', 'avf_post_slider_meta_content_mod', 10, 5);
Best regards,
Ismael
Hi there, I added this code but it didn’t work. I would like the post grid to display the author name exactly as it does on my blog post widget.
Hi,
When I test this snippet, it works for me on my site. Please ensure that you copied the code from the forum and not an email notification so the symbols are not converted.
Then in the user profile make sure that the “Nickname” and the “Display name publicly as” is what you want to show:
this is how it shows on my site
I can not see your site as it requires a login.
Best regards,
Mike