Describe the bug
I am using FlatPro theme by Themeum. The post format select option lists all post formats and does not work while editing the post. There are no Console error.
Please help.
Expected Behavior
Gutenberg should list only those post formats which are defined in theme support.
Screenshots
Here is the screenshot link:
Desktop (please complete the following information):
Sounds like a duplicate of #12571.
Sounds like a duplicate of #12571.
Thanks a lot. I'll follow that.
Closing as a duplicate of #12571. Thanks @swissspidy!
We have solved this issue.
Add this code to the post-meta.js on the theme /flatpro/js/admin/post-meta.js
jQuery(document).ready(function($){ 'use strict';
/* Select Post Format /
$(document).on('change', 'select[id="post-format"]', function(){
for (var i =0; i < $( '.editor-post-format select option').length; i++) {
var formate = $( '.editor-post-format select option:eq('+i+')' ).attr('value');
$('div[id^=post-meta-'+formate+']').hide();
}
var formate = $( '.editor-post-format select' ).attr('value');
$('div[id^=post-meta-'+formate+']').show();
});
/* End. */$(window).load(function(){
for (var i =0; i < $( '.editor-post-format select option').length; i++ ) {
var formate = $( '.editor-post-format select option:eq('+i+')' ).attr('value');
$('div[id^=post-meta-'+formate+']').hide();
}
var formate = $( '.editor-post-format select' ).attr('value');
$('div[id^=post-meta-'+formate+']').show();
});
/* End on load. */});
Thanks a lot.