Tagged: blog post element, custom taxonomy, grid
-
AuthorPosts
-
January 28, 2022 at 10:03 pm #1337805
Dear Support-Team, as always I hope to get some advice from you:
I want to add data from a custom taxonomy to the grid view of the blog. Or at least to the grid view of a blog post element. Normally only title and date are shown. I registered a custom taxonomy “speaker” and want to show them for the corresponding blog posts in grid view. So I need a way to add it in my child theme. Any ideas?
Thanks in advance and all the best!
February 1, 2022 at 6:22 pm #1338298Hey,
Thanks for contacting us!
You could use “avf_post_slider_meta_content” filter. You can find an example here – https://github.com/KriesiMedia/enfold-library/blob/464dca16a6474401e9bd0e58929e6c440aa132fe/actions%20and%20filters/ALB%20Elements/Blog%20Posts/avf_post_slider_meta_content.php :)
Best regards,
YigitFebruary 1, 2022 at 6:49 pm #1338302Nice, Yigit, thanks! Did not find this snippet. Works in the way I would like to have it, but I do have two more questions:
• Is it possible to load a term of a custom taxonomy related to the post with this code? What parts should I alter?
• If I add exactly your code to Child Theme functions.php the author gets displayed but the date is missing. Any idea how to show date AND an other term (of a custom taxonomy)?Best regards
February 2, 2022 at 6:52 am #1338387Hi,
Thank you for the update.
You can incorporate the following functions in the filter to retrieve the taxonomy terms and the author info.
// https://developer.wordpress.org/reference/functions/get_the_terms/
// https://developer.wordpress.org/reference/functions/get_the_author/There are code examples in the documentation.
Best regards,
IsmaelFebruary 2, 2022 at 9:46 am #1338405Thank you. Tweaked the code to my needs. You may close this.
February 2, 2022 at 12:37 pm #1338450Hi,
Great, I’m glad that Ismael could help you out, and thanks for the update. I’ll go ahead and close this thread for now then, please open a new thread if you should have any further questions or problems.
Best regards,
Rikard -
AuthorPosts
- The topic ‘Add content to blog post element grid view’ is closed to new replies.
