admin管理员组

文章数量:1200397

In a recent update to WordPress, the following responsive device preview system was added to the Block Editor:

Easy to hide them via:

.block-editor-post-preview__button-resize {
    display: none;
}

But, how can we disable this feature so when you click on the preview button, it opens up a front-end preview of the post on a new tab. Just as it used to be.

In a recent update to WordPress, the following responsive device preview system was added to the Block Editor:

Easy to hide them via:

.block-editor-post-preview__button-resize {
    display: none;
}

But, how can we disable this feature so when you click on the preview button, it opens up a front-end preview of the post on a new tab. Just as it used to be.

Share Improve this question asked Oct 7, 2020 at 7:40 Christine CooperChristine Cooper 8,8877 gold badges60 silver badges93 bronze badges 2
  • 1 This is not yet possible; there's an existing issue for this at github.com/WordPress/gutenberg/issues/23126 – Will Commented Feb 2, 2021 at 18:09
  • You can also try this: wordpress.stackexchange.com/questions/387527/… – Bart Commented Jun 26, 2023 at 23:44
Add a comment  | 

1 Answer 1

Reset to default 1

Still no way to disable them from what I can see, but the CSS you gave didn't do what I wanted, so I used this:

.edit-post-post-preview-dropdown .components-menu-group:first-child {
    display: none;
}

This just keeps the 'Preview in new tab' option.

本文标签: Disable device preview options in the block editor