Support » Themes and Templates » Adding Post Formats to Twenty Twelve Child Theme

  • Resolved dylan


    I have a child theme of the Twenty Twelve theme.

    I followed the instructions on the codex at

    ..but when I included the following code in the child theme’s functions.php file, it didn’t work

    add_action( 'after_setup_theme', 'childtheme_formats', 11 );
    function childtheme_formats(){
         add_theme_support( 'post-formats', array( 'aside',
         'audio' ) );

    Does anybody know what else I can do?

Viewing 5 replies - 1 through 5 (of 5 total)
  • a similar code worked for me with 20 instead of 11 (not optimized, I usually use 20 when I want to change the priority)

    what result did you get?

    what result do you expect?

    Thank you for the tip. I changed 11 to 20 in the code above. The result that I got was still that the new post formats (e.g. video) do not appear in the “format” options for “add new post”. I had expected that list of options to match what’s listed in the code above.

    Strangely enough, it works now. Perhaps it simply took a while to take effect?

    What is the significance behind the numbers 11 and 20? How would I know what priority number to set an array of additional post formats to? Is there a link to explains this clearly?




    I’d like to ad the video format, but I have this error doing this:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'twentytwelvechild_formats' not found or invalid function name in D:\instantWP\InstantWP_4.3.1\iwpserver\htdocs\wordpress\wp-includes\plugin.php on line 429

    What should I do?

    Best Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding Post Formats to Twenty Twelve Child Theme’ is closed to new replies.