1

I am a bit lost, even after searching answers qutie everywhere.. I am creating a theme for Wordpress, and I would like to have three custom post types (gallery, audio and video). So I added the support into the theme:

add_theme_support( 'post-formats', array( 'gallery', 'video', 'audio' ) );

But then what? I can choose via a radio button when I create a post which one I want to use but where do I put the meta?

I want to display a video. where do I put the video URL? same for audio and gallery.

Is there an easy way to add control depending of the custom type?

  • 1
    gallery, audio and video that you used are not custom post types, they are custom post formats – bravokeyl Nov 14 '16 at 13:13
2

You are confusing things a bit, these are post formats, not post types.

Formats are a native taxonomy, not a post type. As any taxonomy its primary (and only) functionality is to organize posts in logical groups.

Formats don't do anything on top of that. You need to implement yourself any and all functionality you want your posts with Format assigned.

This takes custom code in your theme (often with some custom fields framework as helper).

  • 2
    A note on the templates available for individual post formats would be super useful here, perhaps a link to some of Justin Tadlocks stuff – Tom J Nowell Nov 14 '16 at 13:19
  • Ok thank you for the answer, do you have a link of tuto or whatever to help me to implement the 3 differents post format I want? – user3415011 Nov 15 '16 at 5:23
  • Looking at how core themes do it might be a good start. I hadn't seen that much material on it because it was never really very successful feature and since it's almost entirely up to theme the implementations are pretty arbitrary. – Rarst Nov 15 '16 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.