How to add Post Format

Well, I don’t understand why this isn’t an option in the theme config, but post-formats aren’t displayed at all, neither on posts list or single entry. I want the theme to do that, like Twenty Fifteen (I have a separate /blog/ page, where I would like to type i.e. /blog/type/audio and see all the entries with audio format, like I did with the default theme. It’s still posible to navigate there MANUALLY, as there isn’t any anchor tag to that, but if you do it manually it works)

I saw Sparkling’s original “functions.php” had

add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );

According to this there are a few missing, still the theme doesn’t display those in the array.

So, which files do I need to edit to display the post format in the meta-entry like the default theme did?

PS: I had to edit Sparkling’s functions.php and replace that line to

add_theme_support( 'post-formats', array('aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat') );

So I could still post audios, etc, while I try to sort this out.

Any help is apreciated.

Hi @n3hl,

I hope you are well today and thanks for posting here.

I want the theme to do that, like Twenty Fifteen (I have a separate /blog/ page, where I would like to type i.e. /blog/type/audio and see all the entries with audio format, like I did with the default theme.
I have just tested it on my test site using Twenty Fifteen theme and visiting the URL /blog/type/audio but it didn't work for me as shown in the attached screenshot.

Could you please share your site URL where it’s working fine so that i can test it?

According to this there are a few missing, still the theme doesn’t display those in the array.

So, which files do I need to edit to display the post format in the meta-entry like the default theme did?

You have to add the following code in the functions.php file of your child theme.

function sparkling_child_setup(){
  add_theme_support( 'post-formats', array('aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat') );
}
add_action( 'after_setup_theme', 'sparkling_child_setup', 99 );

Don’t make changes in the Sparkling theme files because if you make changes in the theme file then you have to make these changes again after theme updation as changes made in the theme file get lost on theme updation.

Alternatively you can use the attached child theme that contains the above code.

Best Regards,
Movin