This is because you have used the checked()
function, which echoes its value, inside another echo statement. If you are adding a value to a string you need the function to return
a value. This can be done by setting the third argument, $echo
, to false
:
echo '<lable for="zoom_activity_state"> <input type="checkbox" name="zoom_activity_state" value="' . $zoom_activity_state . '" class="widefat" ' . checked($zoom_activity_state, true, false) . '/> Is comming soon?</lable>';
You’ve also spelt <label>
incorrectly:
echo '<label for="zoom_activity_state"> <input type="checkbox" name="zoom_activity_state" value="' . $zoom_activity_state . '" class="widefat" ' . checked($zoom_activity_state, true, false) . '/> Is comming soon?</label>';
Related Posts:
- Save metabox with multiple checkbox array
- update post meta for checkbox in the admin when inserted in the front-end
- Add a Save Button to Custom Meta Box [duplicate]
- Any way to update_post_meta with html content? It gets stripped and becomes empty
- Adjust query on single
- Why is $_POST empty when saving custom Meta Box?
- Post meta vs separate database tables
- Get List of Registered Meta Boxes and Removing Them
- How to add tab which is visible only in admin side of product in woocommerce? [closed]
- Dashboard like meta boxes in my plugin – how to save their position and open/closed state?
- How to Use WordPress Color Picker API in Custom Post Type Metabox
- How to create Image gallery Metabox in wordpress [closed]
- How to enable users to down-vote in this simple voting counter (that uses the post meta)?
- Conflicting save_post functions when passing the post id and saving custom meta boxes for different post types
- How to add meta boxes to the ‘Add new post’ screen?
- Rearranging Dashboard meta boxes with use of plugin/functions.php
- How can I free up the memory used by update_post_meta?
- How to add multiple featured image in meta box in post editor?
- Plugin admin page meta_box toggle and order state not saving
- Is there a way to list tags order by post_meta field
- Metabox Not Showing on Custom Post Type But On Pages and Post
- Using radio button meta data from a custom meta box
- Best choice of options/settings framework for plugin/theme development
- Plugin development: get_post_meta is not working [closed]
- Ordering posts by metadata
- Act on user meta updated, but only once
- Admin auto-refresh is interfering with Firebug — how to prevent it?
- Show add_meta_box by selecting a specific category
- How to check if Woocommerce Order number equals to post ID?
- 403 Error when text is pasted in Custom Metabox Textarea
- Custom Taxonomy to dropdown box on adminside wordpress
- Create & Save multiple Meta-boxes
- Saving value of a selection option in comment form as comment meta
- Dashboard – get status and position of metaboxes and pass them to ajax method
- Plugin with action ‘save_post’ needs to press publish twice on order to publish
- Getting List of all registered Dashboard Widgets
- what is the difference between these phares?
- How to get Metabox custom field to show checked if value is updated using post meta query?
- How do I update a field of a meta box?
- Input value from metabox is not found in $_POST after post save
- Doubts about the use of metadata and how this can affect performance on WordPress
- update_post_meta not working in a loop
- Run Shortcode of post’s custom field in functions.php / Plugin
- Get draggable widgets on Edit Post page
- Including comments meta box on a plugin page
- How to add a widget to the post editing view?
- Adding admin menus to wordpress
- Automating the process of shortcode generation in a plugin – how is it done?
- Meta box on options page save form problem
- Moving/dragging a metabox removes TinyMCE’s content
- Store custom meta box data as serialized array
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- Adding custom meta boxes to specified custom post type
- Issues Updating Post Meta with AJAX (Seems simple but cannot figure it out)
- How to add custom post widgets as tags into wordpress
- Using delete_post_meta for deleting multiple selected options
- Get audio metadata on file upload
- Plugin can’t be activated [closed]
- Remove Meta-boxes (Yoast SEO plugin) [duplicate]
- Is there a way to add a link with add_post_meta?
- Can I attach a plugin via my add_filter callback contents?
- Metabox is not displaying
- Catch metabox values in Plugin
- want to show CMB2 metabox on woocommerce product data tab
- WP_List_Table Inside Metabox With Bulk Actions Not Working on Submit
- Condition to check previous next article post title
- register_meta not showing custom post type metabox data in rest api
- Insert, update or remove data from database (usermeta)
- Save meta box data from selected dropdown list in bbpress reply form
- Metabox types list
- WordPress Filesystem create CSS-File – get Shortcode ID for Name
- How to save multiple values in custom post type from front end to back end
- add_meta_box does not display meta box in Admin
- Add WordPress Meta Box saved form input to WordPress RSS feed [duplicate]
- set a custom post type to a taxonomy term programmatically in metabox
- Unexpected issue when using attachment_fields_to_edit filter
- WordPress delete mysql rows with string
- Dynamically getting tags in post edit screen
- Saving post meta
- Displaying Custom Post Meta
- How to show metabox just in post.php in admin?
- Plugin dev: How to multiply instances of a plugin in the same metabox?
- Include add_post_meta in a plugin
- save_post not called in plugin / custom field still saving overwriting metaboxes
- Get fields of a widget
- Display Data’s metabox in page
- Show Metabox Images in slideshow instead of static
- How to set/change another post author by custom fields or something else?
- A better way of getting draft posts that has a particular post meta using get_posts function
- Saving metabox updates causing fatal error
- How can I add a field to make link nofollow to the WordPress Link Inspector Window?
- settings_fields() doesn’t work for other roles except admin
- Add a check box in Menu Settings
- Show list of categories that has posts with different taxonomies
- “add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar
- Filter the_content() to add custom figure tags
- when saveing $meta_box i get Undefined index error
- Add query string variables to all hyperlinks URL matching a specified domain
- Build a dynamic block using the default attributes
- Bulk post approval and publishing doesn’t work