Support » Theme: Twenty Seventeen » Is Twenty Seventeen supposed to support the Status post format?

  • I’d like to use the Status post format with Twenty Seventeen, but it doesn’t show up in the list when writing a new post.

    Is this expected? Does Twenty Seventeen only support a sub-set of all post formats?

    If I switch my theme back to Twenty Fifteen, I am able to choose Status.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Does Twenty Seventeen only support a sub-set of all post formats?

    yes; the code for it is in functions.php of the theme.

    to add the ‘status’ postformat to your theme, use this code in functions.php of a child theme:

    //add 'status' postformat to Twnty Seventeen via child theme//
    
    add_action( 'after_setup_theme', 'twentyseventeenchild_amend_postformats', 12 );
    
    function twentyseventeenchild_amend_postformats() {
    
        $post_formats = get_theme_support( 'post-formats' );
    
        if ( is_array( $post_formats[0] ) ) {
            //print_r( $post_formats[0] );
            // Array( supported_format_1, supported_format_2 ... )
    	add_theme_support( 'post-formats', array_merge( $post_formats[0], array( 'status' ) ) );
    	}
    
    }

    now, you should have the ‘status’ postformat in the list.

    this does not provide a specific output for this postformat (by default, the ‘standard’ output will be used).

    for more information, have a look at https://codex.wordpress.org/User:Chipbennett/Post_Formats

    • This reply was modified 5 years, 9 months ago by Michael.
    Thread Starter jasonrehmus

    (@jasonrehmus)

    Thank you, Michael. This makes sense, but I have a follow-up.

    Twenty Seventeen is already formatting my ‘Status’ posts in the way I’d expect from seeing it in Twenty Fifteen: the title is hidden on the front page, but becomes visible on the specific post page.

    If I do what you wrote above, will Twenty Seventeen still output ‘Status’ posts the way it is for me now when I select the newly added ‘Status’ option from the Format list?

    Twenty Seventeen is already formatting my ‘Status’ posts in the way I’d expect from seeing it in Twenty Fifteen: the title is hidden on the front page, but becomes visible on the specific post page.

    could be a ‘bug’ in WordPress
    – it seems that the function post_class() is reading the existing post_format from the database, even if the actual theme is not using it.
    oddly, the ‘status’ post_format is also shown in the ‘edit post’ page when a post has this post_format assigned, even if the theme is not using that particular post_format.

    even more odd:
    the styles to hide the title of a post with the post_format ‘status’, in archive pages, are in style.css of Twenty Seventeen, although the theme does not use this post_format:

    /* Post Formats */
    
    .blog .format-status .entry-title,
    .archive .format-status .entry-title,
    .blog .format-aside .entry-title,
    .archive .format-aside .entry-title {
    	display: none;
    }

    If I do what you wrote above, will Twenty Seventeen still output ‘Status’ posts the way it is for me now when I select the newly added ‘Status’ option from the Format list?

    I would think so – the changes should allow you to assign the ‘status’ post_format to new posts.

    Thread Starter jasonrehmus

    (@jasonrehmus)

    Thanks for your help, Michael. I appreciate it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is Twenty Seventeen supposed to support the Status post format?’ is closed to new replies.