The names of unchecked boxes in Screen Options
for Edit Post
screen are stored in user’s meta, per individual user, as an array. Insert the following code in your theme’s functions.php
:
function wpse_edit_post_show_excerpt( $user_login, $user ) {
$unchecked = get_user_meta( $user->ID, 'metaboxhidden_post', true );
$key = array_search( 'postexcerpt', $unchecked );
if ( FALSE !== $key ) {
array_splice( $unchecked, $key, 1 );
update_user_meta( $user->ID, 'metaboxhidden_post', $unchecked );
}
}
add_action( 'wp_login', 'wpse_edit_post_show_excerpt', 10, 2 );
This will update user’s meta ( after successful login ) by removing postexcerpt
name from the array of unchecked boxes names.
Note: to avoid losing your change, create a child theme and put the code into its functions.php
.
Related Posts:
- Excerpt textarea missing on post editing page in admin panel
- How to Remove Checkbox for Excerpt Under Screen Options
- How to hide wordpress default description box?
- adding the category to the admin column for a custom post type?
- Change page title in admin area
- How to filter by post-format in admin?
- how do I force a single column layout in screen layout
- Make fonts.com font work in TinyMCE (iframe referrer issue)
- wp_list_table search box does not show
- How to remove the site health dashboard widget?
- Securing wp-admin folder – Purpose? Importance?
- stop redirection on /wp-admin call to /wp-login
- Copy my user account’s wp-admin dashboard layout to other users?
- Users are redirected to homepage instead of wp-admin
- How to show an error message after publishing a post?
- Set “Display name publicly as” to be usernames by default
- Is there a way to submit only meta box content in Post edit page
- Moving wordpress from localhost to server throws admin panel access error?
- How to disable admin flyout menus?
- How to display multiple custom columns in the wp-admin users.php?
- WordPress custom permalinks not working on OS X localhost
- 500 Internal Server Error after Register dialog, but with successful registration
- How to hide a specific user role option in a user role list?
- Block access to wp-admin
- CDN + WP Admin Query – .htaccess redirection
- Users Unable to Access Dashboard/Posts/Pages
- Stop loading “collaborators” users on add new post or page?
- Prevent /wp-admin/ from redirecting to homepage?
- Disable the administration email address verification (new in 5.3)
- https://mydomain/wp-admin redirects to wp-login.php?redirect_to=https%3A%2F%2Fmydomain%2Fwp-admin%2F&reauth=1
- Password reset link becomes invalid immediately [closed]
- Get which template being in use within WordPress-admin
- special characters after saving draft interpreted as �
- WordPress and bbPress Login conflicts?
- Allow administrators to pick post author on custom post type edit screen
- /wp-admin/ works but website doesn’t load
- How can I use a variable to include a linked image?
- Add css code in admin_enqueue_scripts
- Add custom list menu on Posts page in admin panel
- Does it matter if two people are using the same WordPress admin account?
- Add column to pages table
- Use Password Protected Form without the use of wp-login.php
- redirect to a dedicated sign in page
- My email address is displaying an email which does not work. What do i do?
- More than one admin logged in?
- Too many redirects after added SSL redirect on port 80 virtual host
- Register page in admin area
- Downgrade admin account by mistake
- Deploying WordPress for clients – what do they have access to?
- Removing Dashboard Menu Items Through The Database
- “WordPress installations is currently out of date” problem with difficult situation [closed]
- Custom plugin admin page issues
- Making Comments, a sub_menu in admin menu
- Without using wordpress cms Is it possible to signup from my html page
- Customising Word press Admin – Add Post Page functionality to another similar page
- How to add ‘Insert HTML Table’ button to TinyMCE in admin?
- How to allow WordPress updates to only one specific administrator?
- How can I remove commas when adding tags?
- Displaying Title in Title Tag on Edit page?
- How to add custom CSS and JavaScript file for wp- admin dashboard (backend)
- GoDaddy hosting wp-admin problem
- How can I remove unwanted word on my WP site?
- Add custom fields to a page template, admin side
- WordPress blog clone.. wp-admin issue
- How to take the help button and link off the dashboard
- Newly created user role not displaying on users screen
- issue with wordpress [wp-admin] redirects, when using kubernetes ingress hosting two wordpress websites using path
- Toggle between block ‘edit content’ and ‘select’ not properly working in WordPress Admin
- WordPress Admin extremely slow when other admin logged in
- Can’t acces login on new site
- WordPress Admin Panel Left Sidebar No showing on Post create page
- WordPress Migration Post Problems
- How to prevent spams from admin-ajax.php file?
- After changing Site http to https, can’t access wp login page with a digitalocean hosting
- Can’t access WP-Admin via HTTPS
- wp-admin and wp-login.php not Accessible after Cloudflare
- Strange wp-admin problem for all users/adminstrators except the original one?
- adding existing menu page on new customer user role
- stop customize.php redirect to login page if admin is not logged in
- Random authentication failures on a load balanced WP setup
- Can I get programmatic access to wp-admin?
- Strange URLs admin area bug
- remove_query_arg on options.php
- wp.svgPainter cannot init error, causing issues with admin panel
- mysql_escape_string PROBLEM
- Cannot access my wordpress website
- Organising and display thousands of photos in media library
- Custom comment action
- Get URL of current featured image with JS in edit post view
- get_current_screen – ‘Trying to get property of non-object’ error
- Added fields in quick edit screen need to update at the moment
- Block tools menu in wp-admin?
- is_admin() triggers error
- WordPress Admin: open popup window on a custom button
- Modify admin panel tab position
- not able to add thumbnail custom field in dropdown
- No wp-admin, wp-config, or .htaccess folder/file
- WordPress blog fails to open
- wordpress admin is broken [closed]
- Https Website: CSS and JS files load in http and admin page does not load too