Support » Plugin: Subtitles » Custom Post Type

  • Resolved heinom

    (@heinom)


    Hello. Sorry to be such a newb, but in your FAQ on GitHub you say that in order to add Custom Post Type support, I should

    add_post_type_support in a function hooked to init, for example:
    
    function theme_slug_add_subtitles_support() {
        add_post_type_support( 'custom-post-type-slug', 'subtitles' );
    }
    add_action( 'init', 'theme_slug_add_subtitles_support' );

    I have no idea where do that.

    In my case, I installed the Seriously Simple Podcasts plugin, and it creates Podcast Episodes as a Post Type. However, when I create an episode, Subtitle is not there the way it is on a regular post.

    So, can you walk me through where exactly I need to go the add the above code?

    Thanks in advance.

    Heino

    https://wordpress.org/plugins/subtitles/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Volunteer Moderator

    Hi Heino,

    Do you know what the custom post type slug for Seriously Simple Podcasts is? If you do then you’d need to put that sample function into your theme’s functions.php file or a standalone file in your wp-content/mu-plugins directory.

    Cheers,
    Philip

    The custom post type is podcast. Being new to WP, I don’t know how to create the stand alone file to refer to above. Can you explain?

    Many thanks.

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Volunteer Moderator

    Sure thing. I’ll make a quick snippet for you today after I’m fully awake. It’s 7 AM in Vietnam. Coffee time. ๐Ÿ™‚

    Hey there! Had your coffee, yet? ๐Ÿ™‚

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Volunteer Moderator

    Hi Heino,

    Apologies for the delay. In my haste to answer you I forgot to realize that I’d be busy preparing for my wife’s birthday today and July 4th. It’s already 11 PM in Hanoi and I’m dedicating the day to my family but I’ll be back to work on Saturday and more than happy to help you out. Thanks for understanding.

    Cheers,
    Philip

    Oh, no worries at all. Tell your wife Happy Birthday from Nashville, TN!

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Volunteer Moderator

    (Copy/Pasted from another thread to keep you in the know.)

    Hi there,

    I’m woefully behind on support after taking a long weekend for my wife’s birthday and American Independence Day, so please bear with me while I catch up with everything. Thanks so much for your patience and understanding.

    Cheers,
    Philip

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Volunteer Moderator

    Hi there,

    Please give this a listen and I’ll be in touch with you again super-super soon. Thank you so much for your patience!

    Audio Link: https://cloudup.com/cCs_niffI1X

    Cheers,
    Philip, CTO

    Hello Philip,

    I was hoping this stream has been resolved. I have a similar issue, I need to add the post type “articles”. If you can share the promised snippet that would be highly appreciated.

    Plugin Support Mrinal Kanti Roy

    (@mkrdip)

    Hi there,

    If the slug is articles then please use the following:

    add_post_type_support in a function hooked to init, for example:
    
    function theme_slug_add_subtitles_support() {
        add_post_type_support( 'articles', 'subtitles' );
    }
    add_action( 'init', 'theme_slug_add_subtitles_support' );

    Note: Put the above codes into your themeโ€™s functions.php file or a standalone file in your wp-content/mu-plugins directory.

    Hope this helps.

    I too am having an issue with getting Subtitles to work with Modern Tribe’s “The Events Calendar”. Since the custom post type is “tribe_events” I am using the following code in my functions.php

    function theme_slug_add_subtitles_support()
    	{ add_post_type_support('tribe_events', 'subtitles'); }
    add_action('init', 'theme_slug_add_subtitles_support');

    However, the Subtitle text field does not display when I go to edit any of my events. Any feedback would be greatly appreciated!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Custom Post Type’ is closed to new replies.