There are several minor problems with your code:
Firstly, you are using shorthand PHP tags, like <?= /*some stuff*/ ?>
they won’t work – see WordPress Coding Standards – No Shorthand PHP Tags.
Secondly, you are not echo
‘ing the variable $client_name
.
Last but not least, you are saving your post meta with the name _client_name
, with an additional underscore at the front, but made a typo while trying to get it, the underscore is missing.
Related Posts:
- How to call a post’s metadata in shortcode.php?
- Query all posts where a meta key does not exist
- Storing revisions of metadata for custom post type
- Admin Area Custom Type Search By Meta Fields Without Title & Content
- How can I filter posts by post_parent in the admin?
- Display custom post type with shortcode
- Custom Post Type with Input fields to seperate table on database.
- How to create a mini directory in WordPress?
- How Can I save multiple records in same meta key?
- Detect meta value changes when post is updated (post_updated)
- Search everything (posts, pages, tags, cpt, meta)
- Compare 3 custom fields and sort by oldest
- Creating a custom post type upon registration
- Reason action hook won’t work with update_post_meta from frontend form? Alternative?
- Can’t sort order of wp_query with 2 meta keys
- Showing Meta Data for Custom Post Types?
- How to get source of custom meta image?
- Having trouble with custom post type / meta box
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- Displaying Meta Box Image
- How can i list custom post type categories?
- ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
- Post the content of a specific “Custom Post Type” post within a post using a shortcode
- Using date stored as custom field to filter posts displayed in admin
- Why does using WP_Query inside a shortcode in an elementor page cause the arguments for WP_Query to get malformed?
- Meta Box Only in CPT Edit Page, Not in Add New
- get_post_meta is returning image id
- get_template_part() – post-meta not working?
- Shortcode insertion in tab
- Metadata for a taxonomy – is there any WordPress way of doing this?
- Update CPT post meta with update_post_meta and cron job
- Custom meta box data array: foreach not working correctly?
- How to check if user meta field is empty in conditional else statement
- Get posts between custom dates
- A better way to add a meta box to custom post types
- Should wp_postmeta meta_key always be unique for a given post_id?
- How do I set all of a particular post meta to a value within the custom post type I’m in?
- Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
- Next Post links not working in custom post type shortcode
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Filter date from post meta when date is in string format
- Get only used meta_values
- Is there a way to exclude posts based on meta_values?
- Submitting Custom Post Types with custom fields from Front-end form
- Get $post->ID from a URL
- Displaying a div from an assigned meta_value when on a page
- Setting Post Title via Meta Data returns Auto-draft
- Filter posts by tax (dropdown) and meta value
- Publish and save specific postmeta to a filtered post_type
- Shortcode leaves no space for other elements?
- Custom post type Shortcodes wordpress
- Add shortcode inside of the_content()
- Custom post type suddenly stoped working after WordPress 5 update
- Run shortcode in custom script in wp_head if post type is CPT ‘Jobs’
- How to show custom field on specific custom post type posts only when filled
- Save CTP post meta different values each day without overwriting previous values
- Shortcode to return single custom post based on post taxonomy
- is_main_query() never called on WP 4.4
- Change post type depending on shortcode
- How to display class name in this shortcode post query
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- Getting WordPress to store 0 values for custom post type meta
- Problem Saving Custom Post Type Meta Values
- How do I output a list of a specific post type in a table?
- Get_post_custom not fetching value from array wordpress
- Show in an entry a Custom Post Type associated to a post
- Save data is post using php front end
- Creating a custom post type upon registration for a specific user role
- How to sort by multiple values in a nested WP_Query
- Why can’t I filter my CPT shortcode by category?
- From CPT Custom Loop into Shortcode?
- editing shortcode for custom post type within a plugin
- Where is get_post_meta value located?
- Custom post type shortcode with taxonomy attribute not working and no errors
- How do I create a customised table list of a custom post type (in the admin area)?
- Display Custom Post Type Archive content with Shortcode
- get_post_meta not working with variable as a post_id for dynamically get the postid
- How to save post_status using action save_post?
- Custom post meta box as a sub form
- Metaboxes in Loop
- Add more custom fields when creating a new custom post type
- Custom meta box data not saving
- Collect custom post in a calendar
- Storing data in a multidimensional array from dynamically generated foreach loop
- Shortcode error
- Problem with ‘save_post’ hook not running
- Values inside a custom field to determine which category posts to display
- How to rewrite CPT-Permalinks the correct way (incorporating meta-box-data)?
- adding a shortcode into a custom post type
- Nested loop called with shortcode duplicating the content above the main loop
- Advanced search form with filters for custom taxonomies and custom fields
- Top 30 Songs using Custom Post Type
- Advice Needed for Post Meta Database Efficiency
- Querying meta values within an array
- why get_post_meta is returning 0?
- Save post_parent in a custom post type
- Update an existing post in a custom post type
- trying to display custom post type with custom taxonomy value by shortcode can’t works [closed]
- Changing to different post type maintains the redirection?
- How do I add the “orange counter” next to a Custom Post Type?