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?
- Form action/link to render a plugin in WordPress front-end
- Update postmeta Parent when post_status child change
- Metabox not show in categories custom post type cmb2
- custom post type category count shortcode
- WordPress request fiter order by related post’s post_title
- Display Child Pages of Custom Post Type Parent Page
- Shortcode to display Staff post type based on Location post type and Specialty post type
- Update database from Quick Edit according to Checkbox state of Custom Post Type
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
- Dynamic Custom Fields
- wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query
- Shortcode for CPT post content in a page
- Show Custom Post Type meta boxes only on Page Edit
- Next Post links not working in custom post type shortcode
- Custom filter function not working with Custom post type
- Foreach inside shortcode not working as planned
- Importing Data from a Non-WordPress database, into WP
- Getting thumbnails of a custom posts featured images in a page-templates metabox
- List Taxonomies: Don’t list taxonomy if it has no post – depending on custom post-meta?
- Remove Post Custom Meta Box
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Custom fields for custom post type
- Show future events based on custom field AND order by date
- Meta Data for Custom Post Type not saving
- Using preg_replace to filter custom textarea
- Can a shortcode included in post content add styles to the ?
- How to retrieve category of a post in have_post loop?
- Check if post with same meta value exists
- Filter date from post meta when date is in string format
- Get only used meta_values
- If Post Meta Equals Current Title Conditional Advanced Custom Fields
- Is there a way to exclude posts based on meta_values?
- Checking if looped item has a parent inside a shortcode
- Do posts, pages and / or custom post type objects have unique ID numbers or can there be multiple objects with the same IDs?
- Archieve.php not loading for custom post type
- Submitting Custom Post Types with custom fields from Front-end form
- get_post_meta is not working inside shortcode
- the_post() is printing titles in page footer
- create custom meta box with default value
- Get $post->ID from a URL
- Displaying a div from an assigned meta_value when on a page
- Meta data (Tags and Categories) for Custom Posts not showing.
- Display different information of a custom post type
- Create Array from custom post type to display a slider
- Setting Post Title via Meta Data returns Auto-draft
- How to Echo Metadata Value in Currency Format
- Issue on Working with Metabox – Checkbox to enable Sale Items
- Filter posts by tax (dropdown) and meta value
- delete_post_meta() for whole CPT / multiple posts?
- How to get specific post meta by title or id
- Publish and save specific postmeta to a filtered post_type
- Add custom attributes to a post
- How to move a post to different post type with all meta data?
- Why do I have to press the “Update” button twice to save my meta box values?
- Shortcode leaves no space for other elements?
- How can I display a drop-down select of Post Names
- how to show records that don’t have custom meta value
- How can I add a shortcode to query Custom Post Type with ACF in WordPress?
- Custom shortcode works in Elementor editor but not on frontend
- WP API Response does not show my registered metadata
- Get Posts by Category, Tag , and CPT Taxonomy
- How to detect that the save_post hook is calling the callback associated to the current edit post page only
- post_type internal ID?
- Custom post type Shortcodes wordpress
- $post->post_meta not pulling any post in wordpress/php
- Values from meta-box not on $_POST
- how to create custom post type with dynamic category_name using shortcode
- WP_Query of custom post type sorted by meta_key has unexpected results
- Add shortcode inside of the_content()
- WordPress Custom Post Type and Shortcode for Portfolio Items
- Returning a custom content types with meta values
- Custom post type suddenly stoped working after WordPress 5 update
- Batch Extract Date from post title and put into ACF custom field
- Run shortcode in custom script in wp_head if post type is CPT ‘Jobs’
- copy images from custom field to another custom field
- Creating shortcode id for custom post types
- Shortcode is displaying the content on top of the page [duplicate]
- Filter content in shortcode
- How to show custom field on specific custom post type posts only when filled
- How to handle this specific case of custom post type?
- Shortcode with WP_Query more than once on one page
- posts within custom post type all share the same content in the front-end
- Save CTP post meta different values each day without overwriting previous values
- get_post_meta returns NULL in front-end, but correct result in back-end
- Shortcode to return single custom post based on post taxonomy
- Cannot obtain custom meta information
- Problem with adding custom post type meta to header by plugin
- is_main_query() never called on WP 4.4
- Change post type depending on shortcode
- Custom Post Type for Shortcode Use – Prevent it display as a post (with slug)
- How can I output WPAlchemy repeating fields meta values in my page template?
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- Save Metabox Custom Field Value
- Echo custom post meta from options array
- Value of post meta dropdown is not showing in WordPress
- Meta box data not saving
- Get all metadata for a given custom post type
- Looking to Customize YouTube Video Embeds