Hi, our 2nd tier support team has discovered that the Visual Editor cell in the first row of the Magazine site has a direct influence on the behavior of the Post Content cell beneath it. If you edit the Visual Editor cell and enable automatic paragraphs, the image in the Post Content cell is no longer surrounded by extra paragraph tags. If you move the row containing the Post Content cell above the Visual editor, then disable automatic paragraph tags in the Visual editor cell, the image tag continues to be shown without extra paragraphs. So we will continue to investigate this but for now the best workaround is to enable automatic paragraphs in any Visual Editor cell above the Post Content cell.
But the issue is that I haven't found a way to restore the post after pressing the button.
Assuming you published the post once before you clicked the Content Layout button, then saved again after clicking the Content Layout button, the earlier version should still exist in the post's Revisions. You can find a link to browse Revisions in the Publish panel in the post editor. Screenshot attached. You can restore an old version of the Post from here, however you should be aware that custom fields are not stored along with revisions. The title and post contents will be restored, but the current custom field values will still be in place.
If you did not save again after clicking the Content Layout button, you can click "Stop using Content Layout Editor" and select the contents that were in use before you clicked the Content Layout button. If you remove the Visual Editor cells above the Post Content cell, or activate automatic paragraphs in those cells, automatic paragraphs in the Post Content cell should work correctly. Please let me know exactly what's happening if that's not the case for you. I may need to inspect the markup generated before and after clicking the Content Layout button.
I'd like to remove or at least hide the Content Layout Editor button and also the Fields and Views button when editing posts and pages (even for admins).
Add this code to your child theme's functions.php file:
function vm_wptypes_remove() {
$scr = get_current_screen();
$disable_slugs = array('post','page','custom-post-type-slug');
if( is_admin() && in_array($scr->post_type, $disable_slugs, TRUE )) {
wp_enqueue_style( 'wp-types-special', get_stylesheet_directory_uri() . '/wp-types-special.css' );
}
}
add_action( 'current_screen', 'vm_wptypes_remove' );
You must modify the $disable_slugs array to include a comma-separated list of the slugs of any post types where you want to disable the buttons. By default, the buttons will appear, so if you create new post types they must be added here to disable their buttons.
Create a new text file called wp-types-special.css. Copy and paste this code into the file:
.button.js-wpv-fields-and-views-in-toolbar,
.button.js-cred-in-toolbar,
.button.js-wpcf-access-editor-button,
#qt_content_bs_component_show_hide_button,
.mce-ico.mce-i-icon.wpv-conditional-output-icon,
.js-layout-private-add-new-top {
display:none !important;
}
Save the file in your child theme folder.