Site logo

Archived topic

Custom Post Meta for Podcasts

1 reply · Started by nurban01 on January 26, 2021

Viewing posts 1–2 of 2

Hi,

I am creating a podcast and setting up my site.

I'd like to include several fields in for each episode:

    Episode number
    Total podcast duration

I already know how to do estimated reading time but couldn't find the applicable functions for podcast metadata.

Thanks!

Hi there,

You can use WordPress default's custom field or ACF - https://wordpress.org/plugins/advanced-custom-fields/ - for the fields and set it up for your custom post type.

You then display them by hooking them into your preferred hook (see Hook Visual Guide) and add in the shortcode for the fields (if you're using ACF) or the PHP snippet (if you're using WP default custom fields).

ACF's shortcode is pretty straightforward as found here:
https://www.advancedcustomfields.com/resources/shortcode/

PHP snippet for custom field looks something like this:

<?php echo get_post_meta(get_the_ID(), 'key', true); ?> where key is the custom field name.

This archived topic is closed to new replies.