The primary issue is your save_post
action isn’t firing because:
add_action( 'save_post'. 'save_meta', 10, 2 );
should be
add_action( 'save_post', 'save_meta', 10, 2 );
You also have inconsistency between client-name
and _client_name
, but without seeing the field_value
function, I’m not sure if that’s a problem or not.
I would also use something more unique than save_meta
and add_meta_boxes
for function names, potential for collision with some other code is high.
Related Posts:
- Prevent post from being published if custom fields not filled
- Frontend posting – everything saves other than checkboxes?
- Confusion regarding Nonce & using it in Custom Columns for Saving Checkbox Value to Post Meta
- Custom Post Meta from custom metaboxes is randomly being deleted
- What do the numbers mean at the end of add_action(‘save_post’)…?
- How to prevent meta data from being edited in a post?
- Custom Post Type Meta Box Text Input Field Won’t Save When Blank
- Generate slug and meta data if meta field is empty
- Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?
- Custom field values deleted when trashing custom post type
- Search multiple custom fields by using meta_query
- Custom Post Type – Taxonomy Dropdown Menu?
- Custom post type save_post action not firing
- How I check if the same post slug has not been used before publishing?
- How to sort a table of custom posts by column containing custom field
- Issue with saving custom post type when editor is removed
- convert Custom Fields Option-Values to Tags/Taxonomy
- Automatically Insert Custom Field on Custom Post Type Publish
- Display custom post types with custom date field value (before today) & order by custom date field
- How to have the right design for a custom post type without accessing themes
- How to add the post ID (or any other post data) to a Contact Form 7 mail?
- WordPress custom meta field for custom post not storing data
- Conditional regex in add_rewrite_rule() for specific query filters & pagination
- How to Duplicate (multiple meta box)?
- List all images from a single post meta value
- WP_Query: include custom post type only with specific meta value
- Is there a way to get a file URL from the relationship ACF field?
- Want to Add Custom Fields for Uploading video to WordPress Users from front end
- How can I dynamically add a post to a custom post type which uses a custom field?
- Custom Posts Types as Custom Fields
- Random image from tag/custom type on sidebar
- Query & Order posts by custom fields
- Set a maxlength for the title input in a custom post type
- Update Post Meta for a logged in user
- Problem querying Custom post type by custom fields
- Using custom field content as expression in IF statement [closed]
- ACF From & To Date Validations
- Query Multiple Custom Posts by Custom Fields
- Disable saving posts as draft (make all posts mandatory regardless of the post status)
- Woocommerce custom field search in custom post type [closed]
- Custom REST endpoints for a custom post type with custom fields
- Cross reference custom post types
- frontend image post uploader
- Show fields based on taxonomy selection in editor
- Permalinks: custom structure for taxonomy – tags?
- How to Get the title of a custom field?
- Create custom post with meta field with AJAX and the WordPress REST API
- How to display custom field value on page?
- How to get specific post meta by title or id
- Populate a custom field dropdown with post titles by author
- How check if a post is saved from backend or frontend?
- echo selected value from dropdown
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- Get data from PHP to JavaScript to set position of each post on front page
- add post meta value
- Get custom term meta problem on single post type
- Filtering custom posts by custom fields (ACF) [closed]
- Incorrect ordering of custom post type based on time
- How can I see a list of products that I have set to outofstock through a custom field check box?
- CPT Repeatable Fields + Undefined Index
- Filtered by a custom field, ordered by another
- delete duplicate meta_value with same post_id
- Search CPT Title AND Meta
- Custom field only on custom post type?
- Writing a custom Glossary plugin
- Filter search posts by post meta?
- Adding a location field to buddypress activity
- How to only display all posts to a custom User Role?
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- Filter posts by their related field’s custom field
- register_rest_field update_callback don’t work for $_FILES
- How to convert Post Object Custom Field into Tags
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- Query a Custom Post Type using SELECT that has ACF fields to compare dates
- I want to create a metabox under custom taxonomy
- How can I register multiple custom post fields to json?
- Sql Update CPT from publish to draft and particular custom field
- Filter custom WP_Query by first letter of a custom field – hopefully using Search and Filter Pro?
- Custom post type meta fields missing on save_post_type
- sorting in wp query based on custom field value
- save_post affect creation and deletion
- WordPress loop add heading before first of type
- How do i create user accounts from custom posts that have email addresses
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- Best way to use Category & Custom Fields?
- How do I add custom fields to posts without having to manually add everytime I post?
- How to display custom post type ordered by a custom field date
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- WP_Query and two custom fields returns no posts
- Function that get ACF fields value before saving
- Is it good practice to search for custom posts based on custom field values?
- Custom post type with custom fields enabled, is there a way to set a default group of fileds?
- Storing/querying custom date data
- I want to split this into two functions
- Repeatable Custom Field for Media Upload
- How to store datetime from custom meta box so that it can be sorted by
- Custom Post type easy way for editors
- Adding a custom field after post title (ex.Example Title [30 Second Read])
- Creating post custom field text area
- Custom Sort Order for Custom Post Type Taxonomy