• Resolved fukr

    (@fukr)


    For some reason I need to change the default post format instead of standard format. I know we can change this via Dashboard -> Settings -> Writing.
    But is there any code snippet that can put into function.php to achieve this?

    [No bumping. If it’s that urgent, consider hiring someone.]

Viewing 1 replies (of 1 total)
  • Thread Starter fukr

    (@fukr)

    i had this figured out from someone’s help. use the option_default_post_format filter, e.g.:

    function wptit_default_post_format( $format )
    {
        global $post_type;
        return ( $post_type == 'post' ? 'aside' : $format );
    }
    add_filter( 'option_default_post_format', 'wptit_default_post_format', 10, 1 );

Viewing 1 replies (of 1 total)
  • The topic ‘Is there any way to change default post format’ is closed to new replies.