Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

On a Twentyeleven child theme's functions.php file I attempted to add video post format support using:

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

...adding the 'video' format to the array. But it would not work until I deleted the function in the parent theme. Obviously, when the theme is updated and functions.php is overwritten, I will lose the change.

Whats the best way to avoid this and add support to my child theme?

Thanks.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

try running your code with a lower priority:

add_action( 'after_setup_theme', 'my_twentyeleven_setup', 20 );

function my_twentyeleven_setup(){
  add_theme_support('post-formats',  array( 
     'aside', 
     'chat', 
     'gallery', 
     'image', 
     'link', 
     'quote', 
     'status', 
     'video', 
     'audio',
  ));  
}
share|improve this answer
    
Works great thanks! –  jw60660 May 16 '12 at 16:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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