add_theme_support post-formats

Posted in: Newsmag
Post count: 27

Hi…

I extended the post-formats using


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

This worked fine in my previous installation of v1.6. I’ve now
updated to 2.3 and it’s not showing anymore.

Please advise.

Post count: 6535

Hi

This code works fine: http://screencast.com/t/5ggnfQBzpy9http://screencast.com/t/iYTBhdwTq Please make sure that you added the code like here, clear the cache memory and test again.

Thanks!

Post count: 27

I’m using a child theme so tempering with the original theme files is something
I’d like to avoid.

I have now encapsulated the add_theme_support into an
after_setup_theme action an this seems to work. What
do you think?


function wpsites_child_theme_posts_formats(){
add_theme_support('post-formats', array('video','link'));
}
add_action( 'after_setup_theme', 'wpsites_child_theme_posts_formats', 11 );

Post count: 6535

Hi

I looked over WordPress official documentation and the action used it’s correct. I also tested the code on my side and works fine.

Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.