WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding Post Formats to Twenty Twelve Child Theme (6 posts)

  1. dylan
    Member
    Posted 1 year ago #

    I have a child theme of the Twenty Twelve theme.

    I followed the instructions on the codex at http://codex.wordpress.org/Post_Formats#Formats_in_a_Child_Theme

    ..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',
         'chat',
         'gallery',
         'image',
         'link',
         'quote',
         'status',
         'video',
         'audio' ) );
    }

    Does anybody know what else I can do?

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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?

  3. dylan
    Member
    Posted 1 year ago #

    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.

  4. dylan
    Member
    Posted 1 year ago #

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

  5. jasindall
    Member
    Posted 1 year ago #

    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?

  6. SuperTamagochi
    Member
    Posted 4 months ago #

    Hi,

    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

Topic Closed

This topic has been closed to new replies.

About this Topic