I used this, inline, on specific pages (using get_current_screen()). I’d hoped this would enable me to hide/show the permalink panel under certain conditions. However, removeEditorPanel() removes the permalink panel globally. This isn’t completely horrifying, since the css still works conditionally, and the permalink can still be edited via the editor (by clicking on the title) everywhere else. Hoping the Gutenberg documentation/options get better soon. If anyone has any suggestions, I’m all ears…
add_action( 'admin_footer', function() {
$screen = get_current_screen();
if ( $screen->id == 'WUTEVA' ) { ?>
<style>
.editor-post-permalink{display: none !important;}
</style>
<script type="text/javascript">
const { removeEditorPanel } = wp.data.dispatch('core/edit-post');
removeEditorPanel( 'post-link' );
</script>
<?php }
} );
Related Posts:
- Is it possible to create dynamic templates for block themes directly from the site editor?
- How to change the case of all post titles to “Title Case”
- Apply the_title() filter in post & page title, but not in menu title
- How to hide specific Gutenberg blocks settings from users
- How To Have Two Gutenberg Editors On One Post?
- Remove post title input from edit page
- Disallow Same Post Title
- How can I see a list of pages and post where my custom Gutenberg block is used?
- Get title of post without using the_title();
- Verify if tag is used on posts
- Dynamically update post title in admin page
- How to show posts rank based on custom field value
- Get post from custom REST endpoint in Gutenberg
- Displaying Page Title on index.php
- How to intercept Post Title on Post-Save
- Testing for post title in ‘if/else’ statement returns no content
- get_post_field – Title without paragraph
- How do I add a reusable block to a programmatically created post?
- Add Category name to Post Title (h1)
- How to add a custom field after wp post
- Sorting posts alphabetical that have single digits
- How Can i Get 5 Recent Post Title With Corresponding Link?
- Limit Gutenberg blocks available to users to choose from
- I want to show category in the post title , how can I do
- How to prevent WordPress from updating the modified time?
- How to display following posts titles in separate div’s on a separate webpage
- Blog Posts not showing title
- Lose “Blog Archive” from page title
- How to Orderby Comments by post title?
- WordPress not opening posts with only numbers if permalink is post_name
- Block Editor: Reset Reusable Blocks to last saved record
- List blocks created by a specific block plugin
- How to Programmatically add an empty Block to every post on wordpress site?
- sql select for post_title and a term name
- WordPress is replacing double minus signs in Post Title, how to disable it?
- How do I change the core post search algorithm? Where is it found/constructed?
- transition_post_status hook doesn’t have any POST data when publish with Gutenberg [closed]
- Is there a way to specify an extra class for a post or page with no title?
- Add title for previous and next posts to Yoko Theme
- Images inside post title
- Block editors annoying warnings
- Loop doesn’t show title of second post and posts thereafter
- How To capitalize The First Letter Of Every Word In The Post Title
- How to show show the Second page title in the page
- How to get links to the last N posts in a specific category?
- Create a list of posts with topic headdings
- Blog post not showing title
- How to merge the content of posts that have the same title?
- WordPress React re-rendering to many times
- How to set a Post’s default visibility to ‘Private’ in Gutenberg?
- Embedding Post Editor Into External Site
- Add data attribute of post_id for Internal links
- Auto inserted strange characters in wp post
- Post title not displaying as recorded in the wp_posts table
- Moving Gutenberg content from one website to another (block media ids wrong?)
- Create/Set Category as Title of Post
- long-title posts do not want published
- How to add a block to a category page?
- Please I want to prefix my WP posts title according to each category
- Add id attribute to h1 element of wordpress post
- Post title spoiler how?
- Odd hyphen added at end of blog post
- My posts page is missing the page title
- Hiding title of selected post without plugins
- 2 Domains, Same Content, Different Titles?
- Post Category link is same with Page link
- Hide title in Merlin Theme on posts and pages only
- How can I choose and change a post title at random from an array when it is published?
- Post title to show all characters after having it limited for preview
- Add Image Before Posts Entry Title
- prevent same wordpress post title
- Get post title by Alphabet
- Get post title of faulty link on 404 error page
- How to get all post titles starting with numbers and symbols?
- Is it possible to have different header style blog titles in different categories?
- Custom Post Title as search term
- Is there a way to separate wordpress titles from their posts?
- display only the title of the post into a certain category
- How do I show the post title if an advanced custom field hasn’t been used?
- Deleting first four characters from all Post Titles
- Single post pagination
- How remove “recent comments” title without modifying code? [closed]
- clicking on page title
- Title displaying multiple times
- Custom Post-Rename Function Does Not Function in WordPress 6.x
- Is there a block to print post link standalone in a block theme?
- How to change Post title background size?
- Notify/check if the content of a custom gutenberg block has changed on save_post
- How to link Post Title to uploaded file?
- I want the Title of page/post to show up topmost when reading the post/page
- editPost without undo entry
- Hide page title on dedicated posts page
- ‘403 Forbidden’ when publishing a post containing different blocks
- Gutenberg block: add a multi-select for posts
- Preset category checkbox from URL parameter when creating new post
- How do I get my Gutenberg element to prevent last modified from updating?
- Comment count next to post title?
- Can’t save/get Patterns’ `post_content` attribute
- Menu item on a category
- Shortcode in loop always display data of first post on the page