Support » Theme: P2 » Removing post format types

  • I am trying to remove all post format types but “post”. The post format type “post” is all I want – both in back end and front end.

    There are several descriptions in forum posts and elsewhere on how to do this but they do not work anymore.

    Can you please help me?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, try adding this in a child theme as well.

    // Use the after_setup_theme hook with a priority of 11 to load after the
    // parent theme, which will fire on the default priority of 10
    add_action( 'after_setup_theme', 'remove_post_formats', 11 ); 
    
    function remove_post_formats() {
    
        // Add this line to remove post formats
        remove_theme_support( 'post-formats');
    
    }

    @link: http://codex.wordpress.org/Function_Reference/remove_theme_support

    Nope – didn’t work. Thanks for your input though!

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Try this child-theme function from my colleague Frank:

    function p2_child_remove_post_formats( $formats ) {
    	return array();
    }
    add_filter( 'p2_get_supported_post_formats', 'p2_child_remove_post_formats' );

    In your child theme’s stylesheet, add this to remove the options from the front end:

    #post-types {
      display: none;
    }

    Thanks Kathryn!!

    The post formats are now gone from both frontend and backend. So that is nice 🙂

    Last problem remaining is that i still need to have the post format “Post” set as the only option instead of “Standard”. The difference between the two is that there is a headline in the “Post” format but not in the “Standard”.

    Any idea?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Removing post format types’ is closed to new replies.