How to add Post Format function in WordPress Child Theme

[contentblock id=1 img=adsense.png]

We used to use our child theme of TwentyEleven for this site that support some Post Format functions including video. However several days ago, we update our WordPress site into the new one as well as updating the TwentyEleven theme. Unfortunately, I could not use video format since I modified the functions.php from the parent theme which was changed as it is updated now while my old parent’s function also updated. So I was googling how to add post format function in WordPress child theme in order to fix it. Fortunately I found the trick on wordpress.stackexchange.com and it is very useful. Below is the code and I added it into the child theme’s functions.php.

// add post-format in child theme
add_action('after_setup_theme', 'minds_setup', 11);
function minds_setup() {
    add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery','status', 'quote', 'image', 'video' ));
}

One Reply to “How to add Post Format function in WordPress Child Theme”

Leave a Reply