You could do something like the following, this should go in your Child Theme’s functions.php or if not using a Child Theme then add to a custom plugin:
function hide_permalink_metabox( $is_post_edit_page ) {
if ( !current_user_can('update_core') ) { // allows Admins to edit the permalink
echo '<style>
div#edit-slug-box {display:none!important;}
</style>';
}
You may need to double-check the actual ID of the permalink DIV, it might be different from mine depending on what version of WP you’re using and if you’re using the Blocks Editor (I don’t, I use the Classic Editor).
Related Posts:
- Prevent WordPress from abbreviating-long-slugs…-in-the-admin
- Menu Link Redirect Based on Username or User ID
- What is the action or filter for changing permalink in Edit Post/Page?
- How to get this JavaScript working with get_permalink
- Automatically append ID to at the end of specific URLs
- Change in permalink structure made javascript cookie not work correctly
- Suddenly new posts have the default permalink instead of the post name
- how to get permalink
- Gutenberg Editor: dynamically edit slug field based on ACF field
- Edit Post Permalink option removed, looking for possible causes
- Can you customize the automatic permalink population on new posts?
- Need help with add_rewrite_rule
- How to get pretty URLs with add_query_arg in permalinks
- Removing Parent Page(s) from Permalink
- Page begins with number, WordPress adds 2
- Permalinks to Custom does not work (out of box)
- Why don’t WordPress post slugs allow accents?
- Multi-language permalink in qtranslate
- Modify get_permalink with a specific filter
- Include Taxonomy slug in post url
- How to set permalink to fetch all children custom posts with parent post in wordpress?
- Rewrite url / permalink for default archive – yearly / monthly
- Should I use relative or absolute urls when pointing to internal pages
- WordPress on VirtualBox – no pretty permalinks
- permalinks has -2 with post name structure. why?
- How can I change permalinks to use a different domain and path from where the blog is hosted?
- Gutenberg Editor: dynamicaly change slug field with an ACF field
- Child pages with same slug
- Permalinks, Rewrites, Get Variables, Oh My!
- Remove words from permalink when saving post automatically?
- Permalink problem
- Removing leading zeros from custom permalink structure
- When is it a good idea to build a permalink structure from scratch?
- How to reset canonical URLs / fix redirect loop
- Trailing slash at the end of permalink loads faster / better SEO?
- WordPress blog posts permalinks giving 404 on nginx
- Permalinks by page/post name returning 404
- why does my url not update after migration?
- Changing the post date without causing 404 error
- Rewrite rule for a query string
- Why does the ‘Month and Name’ Permalink Format not Work on my new WordPress Site (running on IIS7)?
- How do I add /blog/ as a prefix to permalink structure for posts, categories & tags?
- Custom permalink structure for posts in specific category
- force permalink slug for page vs post_type slug parent
- WordPress url ingore permalinks setting [closed]
- Rewrite URLs for LeadPages due to subdirectory installation
- After updage wordpress 4.4 to 4.5 nginx config works not properly
- A link to a page including an anchor doesn’t go to that anchor – URL gets changed
- Default permalink changes
- WordPress Permalink feature alternative
- How can I emulate permalink behaviour on static pages
- Unique one time use URL
- the_permalink on the homepage vs posts for sharing links
- Media/attachment urls don’t redirect with fake URL structure
- Test site pages go to main site
- when I create a page with a /blog permalink the css gets messed up
- Strange behavior: random HTTP error 500 fixed by visiting Permalinks settings page (htaccess issue with language code)
- how to prefer static page if it exists over wordpress page
- Remove a link from a page ID used within an array [closed]
- Why will Pretty URLs not Work?
- Get Posts Based on Tag Matching Page Title
- Rewrite rule not passing variable
- Passing variable as permalink URL
- “set_front” => false on custom post type breaks wp_list_categories links [closed]
- post preview/thumbnails not displaying correctly- linking to “home” instead of post?
- Moving blog and maintaining current permalinks
- All pages load the home page if pretty permalinks are used
- Add custom taxonomy using JS in post editor
- where can i see wordpress automatic redirect History
- WordPress keeps removing query var from the URL
- How can I access to the same post-type “page” from multiple different urls?
- Multiple URL rewrite rules and get every prams
- WordPress url customization
- permalink not showing correctly using wp_insert_post and post_name
- 404 error on published page with specific permalink
- Changing category base breaks permalinks
- Added .html to Woocommerce permalink but pagination don’t work!
- Subpages getting a 404 error after changing Parent page URL
- My permalinks for all pages and posts now include old page titles as parents/categories
- Updating wordpress permalinks to use https://
- WordPress Pagination Custom Rewrite Rule for Pages
- Is it possible to use % sign in post permalinks?
- Remove/hide a specify category-name from the url
- Page permalink ending in “-2”
- rewrites and custom links in page need help with add_rewrite_rule
- Change the permalinks structure
- All pages lead to home
- Although rewrite engine is on, I get 404 not found on every page
- how to change permalinks from id to name of a particular location
- Using a taxonomy value as part of a post URL
- How do you put your own rules into .htaccess?
- Why do I have “category” in my permalinks?
- Getting the Posts’ permalinks from XLMRPC
- WordPress: Permalinks link to old names
- Permalinks is not working in my wordpress setup
- Use .htaccess to redirect homepage to its permalink
- -2 generated in permalink postname [duplicate]
- Plugins, themes and other dashboard links including permalinks giving 404 error
- RSS feed URL for post comment shows HTML source code of page
- After moving content to a new site, gallery thumbnails are not pointing to media files