You have to use $_REQUEST
instead of $_GET
, because when an user saves a post the POST
request will be send to the server. It means that there is no $_GET['post']
argument and your meta boxes won’t be registered. And if they are not registered, then nothing will be saved.
// Only shows for the admin front-page assigned page.
$front_page_id = get_option( 'page_on_front' );
$post_id = (empty($_REQUEST['post'])) ? NULL : $_REQUEST['post'];
if (is_admin() && $front_page_id == $post_id) {
........
}
Related Posts:
- Select input in metabox not updated
- How to remove admin menu pages inserted by plugins?
- How to use more than 256MB of memory in the admin?
- Make Custom Metaboxes Collapse by Default
- Check for and enforce unique value in user-entered custom meta field in WP Admin
- What is the best way to customise admin files so they survive future upgrades?
- Creating my own Admin Forms in a WordPress CMS?
- How to build custom WP admin with custom URLs
- WordPress prompt checklist before publish?
- Adding an email column to a Custom Post Types Admin Screen?
- Custom Dashboard Home Screen Options
- Add custom column to Users admin panel with Types user custom fields?
- Add ‘Right Now’ widget to custom dashboard
- Hide upload image fields for the different media upload popups
- How can I create a custom meta box to add an mp4 video to a page?
- Adding all sub-pages to the menu manager
- Preserve custom URL parameter after saving post
- The Best Way to always load the newest version of 3rd party code
- I’m using add_meta_box() but want to include TinyMCE editor *and* Media Uploads for each box
- How to get custom page template being edited in gutenberg editor
- Change the Labels of Users to Customers in Admin
- custom meta box for page default template
- Organizing the position of widgetized areas in the backend
- Admin search post meta
- I need a “Choose from existing content” popin
- Customizing Users in Admin Area
- Simplify the admin end
- What is the best way to modify Admin Panel on WordPress?
- Stop Expansion of Top Level Menu in the WordPress Admin Sidebar
- How to create “custom page types” with different custom fields in them?
- Let author add field to metabox by pressing a button
- Meta Tags by Meta Box
- Showing Meta Box via Jquery Checkbox
- Usage of custom post types in a custom admin menu
- problem saving/ retrieving custom meta with wp alchemy metabox
- WordPress 3.1.2 Bug: add_theme_support() and video post format registering twice
- Multiple header style under meta box
- How to create custom backend admin menu in different languages?
- remove screenshot.png via dashboard
- Adding a drop-down (select tag) option under Menu Settings in WordPress Admin
- POST 429 Error when trying to place more than 20 images into post at once
- Adding more than one WordPress Gutenburg block type?
- Change meta-box title- “LearnDash Quiz Settings” to “Quiz Settings”
- Embedded Options in a Custom Metabox
- duplicate featured image functionality in custom meta box
- Custom Admin Section
- How to add custom Author Info Box to blog posts “only” and NOT custom post templates
- how to hard link to the posts page?
- issue with saving custom metaboxes fields
- after checked the checkbox in backend, dont show social link on frontend
- Admin menu disable new/delete page
- Change post template the proper way
- Adding pages to the Admin panel
- Customize Admin Section
- Get a different size of Image thumbnail while working with custom metabox
- Need Advice to Working with Custom Post Meta
- How to create functions that affect only a specific user
- Remove “minor-publishing” div from Publish admin metabox
- Create users via PHP
- Organizing Code in your WordPress Theme's functions.php File?
- Is there a flowchart for WordPress loading sequence?
- How to display by default only published posts/pages in the admin area?
- How do register_sidebar() and get_sidebar() work together?
- WordPress custom post types breaks permalink on theme reinstall
- Creating a searchable A-Z listing of hundreds of companies/services
- Show attribute description when filtering by that attribute
- How to remove “publish metabox” from each post type
- woocommerce Add custom field set like billing fields
- Adding action to save_post, post needs to be saved twice for function to work
- Auto redirect after session expire, but only for one user
- Hide metabox dependant on page template chosen
- How to create a completely private wordpress with multiple membership levels
- Why do posts disappear from admin after upgrading from WP 2.7.1 to 3.0.1?
- “An automated WordPress update has failed to complete – please attempt the update again now”– But there is no .maintenance file
- How to customize
- Modify files without losing customization after updates
- Determine if action was executed in functions
- Archive subtitles for different types of archives
- Implement a Walker with custom object rather than WordPress database object
- Adding tags when creating new post
- Custom Content Page
- Add Member’s birthdate from Backend and shows it on frontside [closed]
- How to add functionality to an existing theme (using child themes)
- 404 when Previewing an unsaved draft
- Custom field not editable by the user
- How do I make mysite.com/comingsoon WordPress to become my main website’s WordPress?
- Use a custom page with dynamic content as a user profile page
- Invitation link to a site in multisite network does not work?
- Add helper text in custom-header section in admin
- How to edit content in code view of home page when there is some theme applied?
- WordPress core jquery version file not loaded?
- Can we add an extra button on woocommerce shop page and use it to send the product info including image in a mail?
- Add a custom intro page
- Custom dropdown search form that allows users to select option B based from Option 1
- Header image doesn’t show up on page
- How to get name and email value from a custom form and add it to campaign monitor subscriber list?
- Custom Link In WordPress Media “Attachment Details” Upload Screen
- “Static” pages within a theme
- Custom WordPress SQL Query 4 posts per custom taxonomy
- How to display product variations on same row