Assuming your $hasp_expire_date = get_post_meta( $post_id, ‘hasp_expire_date’, true );
is giving you the correct value you need, you are storing your that in the $hasp_expire_date
variable.
So edit that second line to:
$num_comments = get_comments_number( $block_data['id'] );
// Pull in the value you need
$hasp_expire_date = get_post_meta( $post_id, ‘hasp_expire_date’, true );
// You are going to concatenate or add that value to your string.
$entry_comments = $hasp_expire_date.'<i class="fa fa-speech-bubble"></i><span>'.$num_comments.' '._nx( 'Comment', 'Comments', $num_comments, 'comments', 'uncode' ).'</span>';
Hope that helps!!
Related Posts:
- How to pass arguments to add_action() or retrieve return value of called function?
- display condition based on post term and status
- How to include checkbox in widget backend form?
- Using register_activation_hook in classes
- Upgrading PHP version results in “Use of undefined constant WP_CONTENT_DIR” warning?
- How to hide get_theme_mod if field empty
- renaming an admin menu item with decimal array index number
- How to get the original price of the product in woocommerce?
- How to make sure that only one wp_cron() runs at a time?
- Replacing the NavWalker dropdown element
- Fatal error: Call to undefined function wpsc_cart_item_count()
- No wp-config.php file on local install of wordpress – site still displays
- Widgets not showing in my custom theme
- Edit category output
- integrating external php library into wordpress- the right way
- To echo or not to echo?
- Different background-image by category
- How to limit the content coming from wordpress shortcodes?
- What is the fastest way to load PHP functions that are only used in one theme template?
- Writing scripts using WordPress / WooCommerce classes?
- storing wp_head in a variable?
- Get taxonomy terms only of the WP_Query current posts
- Change description on specific WooCommerce product status change
- How do I attach a php file to an arbitrary slug and still have access to the wp-core functions?
- Woocommerce redirect thankyou page based on product ID doesn’t empty Cart
- Is_template how to add one more template [closed]
- Open post-content in archive page in a Modal box with bootstrap
- Creating own shortcode – echoeing php variable based on JS variable
- How to modify URL (add GET values) after front end form submission?
- Sort meta-value in the sequence array in pre_get_post
- Error: options page not found
- Filtering a Database Query
- anyway to put inside a $outprint=sprintf()
- Can’t save php string to a custom field
- Blob file download problem
- What does $_GET[‘iphone’] do?
- Appended comments but they show up above the content instead of below
- get_template_directory adding FTP root folders in urls
- What’s the best way to include PHP code in pages?
- Is there any wordpress plugin to upload images and captions to multiple pages once
- Removing the first 8-10 letters from a post?
- Line breaks inside shortcode variable
- Site Health says I’m running an older version of PHP even after I upgraded to 7.4.4
- WordPress REST API register_rest_route give a 500 error
- Where to insert redirect code based on http_referer?
- woocommerce wc_create_order(); is creating multiple orders instead of one?
- Override Admin menu icon
- Trying to get property of non-object in WordPress Breadcrumbs
- Delete database record using plugin from admin panel
- Post not populating for custom post type based on category selection
- How to display success message correctly and delete it when the page is refreshed
- Infinite Loop – WP_Query
- call_user_func_array() expects parameter 1 to be a valid callback, function ‘———-‘ not found or invalid function name
- How can i make a search box to search by custom field
- ‘Bones’ theme: Load stock scripts in footer instead of header?
- go to home page when i select default in select-box
- Display Custom Field in Sidebar if Value is Present
- Database entry removed on browser refresh, Ajax PHP jQuery
- Hide specific product from Woocommerce if the logged-in user has already enrolled into the course
- How to find which .mo file is responsible for displaying a particular localized string?
- wp_Query with mutuplea values returns all posts
- is it possible for a URL to filter by tag
- How to stop hiding buttons forward / backward in pagination?
- Preserving backslashes in post_content
- Add to cart quantity dynamic
- Infinite looping next post link within a certain category on a post
- Limit content size by character or word in database
- String replace for Login/Logout concatenation problem in menu
- PHP call_user_func_array() error
- Redirect after login depending on the URL
- Searching a custom WP table and displaying results in an HTML table
- Handling form actions in WordPress
- Set user status to absent on WordPress
- Customizer: How to Sanitize a Decimal Number Range
- Obtain wordpress user role
- Shortcode’s output to use as other shortcode’s parameter
- PHP code printed into CSS classes
- Displaying POST content with HTML tags and all
- How to hook into the subscriber /wp-admin/index.php page?
- What syntax is this? “{{post.price}}”
- WordPress 3.0 PHP Error – notice WordPress_product_Type was called incorrectly
- Retrieving specific images from Media Library
- direct query to post_meta table
- Can’t put a hyperlink on Featured Post’s Image
- Adding unique marketing messages between certain products whilst using isotope/Infinite Scroll
- Notice: Undefined index: fix with isset [closed]
- Include administrator in author list
- Pass php to database in JQuery: With AJAX?
- List sibling pages widget, exclude current page
- WP Simple Fields – Single repeatable field inside repeatable field group
- get_permalink returning first letter
- Path for contact form file
- File Upload with Server in safe_mode
- WP plugin updates [duplicate]
- Custom Archive Page
- Load files content [closed]
- Shortcode for Visual Composer Grid fails turning string to integer
- Upgrade wordpress core programmatically with PHP [closed]
- Too many if’s and else if’s ?? – Must be better way [closed]
- Import js variables loaded via wp_localize_script() into js module without global scope connection