I have searched through the forum and on the WordPress codex site but can’t seem to find an answer to this problem.
Using the Fullwidth Masonry to display the latest posts from the blog, is it possible to display the category that each post belongs to as well as the Title, Date and Author? I have tried several options and all return ‘Array’. The code I am using is pasted below.
Many thanks for any help.
$this->loop[$key][‘taxonomies’] = get_object_taxonomies(get_post_type($the_id));
$cats = ”;
foreach($taxonomies as $taxonomy)
$cats .= get_the_term_list($the_id, $taxonomy, ”, ‘, ‘,”).’ ‘;
echo ‘<span class=”blog-categories minor-meta”>’.__(”).” “;
Try putting print_r instead of echo:
This way you can inspect the returning Array.
Many thanks for your reply.
I’ve just tried replaying echo with print_r but it’s still returning ‘Array’. Any other ideas?
Thanks for your help.
The topic ‘Display the category of each post in Fullwidth Masonry.’ is closed to new replies.