Support » Developing with WordPress » On Page, post formats revert to Standard

  • wileycoyote78


    I’m on localhost, and I’m tinkering around with post formats. I have enabled the formats for audio and video, as well as added them to the Page post type.

    function mytheme_format_support() {
     add_theme_support( 'post-formats', ['video', 'audio' ] );
    add_action( 'after_setup_theme' , 'mytheme_format_support' );
    add_post_type_support( 'page' , 'post-formats' );

    When I go to create a new page, happily, the format options for Audio, Standard, and Video are present. Unhappily, however, when I select either Audio or Video, WP saves the page as Standard; for posts, though, WP saves the selected format just fine.

    Am I missing something? Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz


    Seems to be an issue with the block editor. Your code works for me as expected with the classic editor, but not the block (Gutenburg) editor. You should consider raising an issue in Project Gutenburg’s GitHub site. Free registration is required if you’ve not already done so.

    Once the format is set with classic, the block editor does not override this despite it showing as “standard”. This could be leveraged as a possible work-around.

    Thread Starter wileycoyote78


    I was able to duplicate your solution: downloaded the Classic plugin, selected “Audio” and updated the page. On the front end (I have the page file querying the post format for testing), it shows “audio” as desired. Switching back to the WP default editor, the Post Format does indeed show “Standard,” even though the saved format is “Audio.”

    Because there seemed to be a differentiation between the Gutenberg plugin and the block editor that comes with WP in the GitHub page, I installed and activated Gutenberg, and the issue persists. I will report the problem to them.

    Thanks for the pointer.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.