You need to register the proper settings fields in your PPAdminOptions()
and also point the form action to options.php
:
function PPAdminOptions() {
if ( !current_user_can( 'manage_options' ) ) {
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
}
?>
<div class="wrap">
<h1><?php echo get_admin_page_title(); ?></h1>
<form method="post" action="options.php">
<?php
settings_fields("paid-posts");
do_settings_sections("paid-posts");
submit_button();
?>
</form>
</div>
<?php
}
I tested this on my local machine, and it saved the checkbox state.
Related Posts:
- Call require_once form admin page with checkbox
- This CSS Stuffing Works, But Is This A Good Practice?
- Settings API – easiest way of validating checkboxes?
- WordPress Admin back-end – advanced options page?
- How To View Site from Non-Logged-In User’s Perspective
- wp_dropdown_pages() in theme admin page
- How can I show the contents of only a few users
- Settings API not saving values to database
- Admin option sidebar count
- Add Custom Script in Other Plugin’s Options page
- Accessing variable from admin panel?
- How can I POST or GET to the same admin page from which I am POST-ing or GET-ing
- WordPress custom admin functions security
- Show global Message in User Profiles with admin only Input field in WordPress Backend
- [Multisite]How can I update custom blog option?
- Get Link of Page Selected through a Select Field in Custom Admin Page
- My code for creating an admin option doesn’t work
- I don’t have permission to save the theme options I created myself?
- Pull Random Images From Options Page [closed]
- Woo Commerce Settings for Check-out Form [closed]
- Where in WP can I check history or log of updates of plugins etc?
- How does admin-ajax.php work?
- Hide other users’ posts in admin panel
- Editor Styles and Typekit
- WordPress admin stylesheet
- Is it possible to create a WordPress tour? V3.3.1
- Securing Admin Accounts – Username Discovery
- Plugin options will not save in database
- Prevent author from changing their posts if admin has modified
- Showing WP_Error message with admin_notice action hook
- Set Featured Image programmatically (in admin) with JavaScript?
- Can I set a default dashboard layout for all users?
- Taxonomy/category hierarchy lost when editing posts [closed]
- How should I use register_setting, add_settings_section, & add_settings_field in my plugin’s options page?
- Making the thumbnails in the backend Media section bigger
- How to remove “Super Admin” from All Users for those that are not a “Super Admin”?
- Setting Login with User Name and Password default option for Jetpack Admin Login
- Downloading entire site locally with httrack
- How get Themes list via REST api?
- add_submenu_page set for multiple roles [duplicate]
- How To Create User Specific Admin User Pages?
- Adding markup to column text in “Edit Pages” admin page
- Disable HTML (Text) Tab in Post Editor
- How to remove “publish metabox” from each post type
- Change home-url in dashboard
- Admin doesn’t have sufficient permissions to plugin’s page
- Admin multiple column sorting
- How do I add a contact form?
- Adding html format on tinymce visual editor
- WordPress ACL (folder + permissions)
- Editors change a permalink on an unpublished post, but only admins change a permalink on a post that has ever been published?
- Locked out of admin and some pictures don’t show after failed SSL installation
- Grabbing the first image attached to a post and use it with the admin columns
- Seems that admin_post_{action} does not executing
- If statement for admin page
- Customizing WordPress Admin – How to Change the Avatar size
- Create a WordPress administrator without access to back-end
- How to log out from admin or front-end only?
- WordPress Brute Force Prevention
- How To Make Iris Color Picker Showed Up Over Form and Text?
- admin_enqueue_scripts not rending JS file correctly
- my checkbox is not saving it’s value
- Can’t login to my admin area
- Accidentally changed website url
- Private post hidden from Admin too
- Send admin to a different login than users?
- How much traffic is real traffic?
- How to change the descriptive text on the menus admin page?
- Getting rid of menu items on a custom taxonomy
- Having problem creating local instance of wordpress site
- WordPress Plugin Admin Tab
- WordPress Settings API settings not saving for some users
- Parsing post->ID in included plugin file
- PHP class to add pages and fields in admin panel
- Gutenberg UI has changed
- How To Remove Import/Export Option From Tools?
- Highlight active Admin Menu when added though add_menu_page
- Unable to access admin web page
- Create WordPress Menu Item Without Linking to a Custom Page
- Echo custom admin field into a is_single()
- exclude ID on avatar
- Missing content on website. Admins cant sign in
- Different role for free and pro users in wordpress without using bbpress
- Is Post-Form Resubmission somehow prevented in WordPress 4.2.2?
- Enqueue script throws error in console
- How to sort post_meta in edit.php?
- Scripts are not called until I login from wordpress backend
- Link to all posts page?
- WP Logs me out after updating anything on dashboard
- Adding additional text fields and image upload to a Page?
- If the only thing I use MySQL for is WordPress, do I need MySQL’s timezone tables?
- plugin to upload to youtube via wordpress [closed]
- How to fix: Clicking ‘Quick Edit’ link in Admin (edit.php) makes posts disappear?
- My Account Lost Administrator permission
- WordPress admin panel is blank
- Use the wordpress admin table
- deploying a standard build of wordpress in WHM/cPanel
- Add custom css class to wp-list-table row for custom post type
- Custom column with post ID not working in CPT
- Modify ‘the_content’ appearance in the admin area