Support › MB Views › Related Taxonomy to Custom Post Type
I have a custom post type "podcast" with a custom taxonomy "genre" and there is a custom field within this custom post type "headshot-image".
I"m am trying to use view to make a shortcode that will be displayed within a widget.
I would like to query for a related "podcast" based on "genre" and then I would like it to display the "headshot_image" with the "title" under as a link.
I'm a rookie to metabox and I don't know what I'm doing wrong. I'm also an amateur coder.
Thanks for your help.
You need to have a basic knowledge of coding to create the shortcode. There are some guides for you:
- Follow this document to get posts by taxonomy https://developer.wordpress.org/reference/functions/get_posts/
- Use the PHP function in the View https://docs.metabox.io/extensions/mb-views/#running-php-functions
- Then set the location type: shortcode https://docs.metabox.io/extensions/mb-views/#locations
You may not believe this, but I got the original issue here figured out.
I have another one now, I'm in the Genre area which is "like category" for post.
Is there a way that I can add a featured image into the genre "category" area?
You can use the extension MB Term Meta to add custom fields to Genre taxonomy. The Builder also supports this extension https://share.getcloudapp.com/DOu6wqmJ
Read more on the documentation https://docs.metabox.io/extensions/mb-term-meta/