In the loop :
$custom_fields = get_post_custom(the_ID());
$my_custom_field = $custom_fields['zh_invoice_round_off_number'];
convert_number((int)$my_custom_field);
Or with your function :
$custom_value = zh_get_invoice_round_off_number();
echo convert_number( (int) $custom_value );
Related Posts:
- WP doesn’t show Array Custom Fields?
- Add new “Insert Into Post” button with another function
- Add meta data to the menu
- can you set a default value to a custom field
- Guest Author – How can I use custom fields to create guest author link?
- post meta data clearing on autosave
- Add input field to ‘Pages > Edit Page’ through functions.php
- Auto-add paragraphs to custom field?
- Add description text under input field for new profile fields
- How to add a predefined custom field without using a plugin?
- Populate Custom Field Dropdown on Theme Install?
- How to add content at the end of posts?
- Auto Populate Custom Field with Complex Value That Increase by One?
- Custom Metabox Not Saving
- Getting the ID of any image for use in functions.php
- Auto-remove custom field with no value on publish
- Display custom field values from posts on frontpage
- Declaring in variables [closed]
- Populate Javascript code with value from WordPress Custom Field?
- Specific coditional usage [closed]
- IF Custom field value equals ZERO
- Hide custom fields when empty
- How to disable Edit Post and Allow only Custom Field?
- Function that replaces the image in the absence of the post meta
- Changing the order of custom fields in the dashboard for Woocommerce variable products [closed]
- Custom metabox not working
- Stripping and/or altering the content of a custom field (video URL)
- Odd functions.php issue in WordPress
- WooCommerce 3 get custom variation on process order [closed]
- Using ACF Custom Field value in a URL with do_shortcode() [closed]
- Meta boxes not displayed, data isn’t being saved
- Calling Custom Field within Function wrapped with Divs.
- Get fields from metabox array
- Including inline Custom Fields info with add_filter in functions.php
- How to automatically create a custom field when a post is published?
- How to enable revisions for post meta data?
- Any way to add custom options to Gallery Settings?
- Get a list of all available fields in the User Profile
- How to display all custom fields associated with a post?
- How do I make my function add variables/values to the $post object?
- Enabling shortcodes for custom fields
- passing argument to get_template_part() or a better way to code
- ACF – get_field() using ‘option’ as post_id not working
- Populating meta box with select-list of existing posts, and assigning it to custom post types
- Move value of one custom field to another
- How do I add custom_meta_box_id’s value?
- Get a post_id where meta_value equals something in a serialized meta_value field
- little help with a mySQL query to wp database
- How do I query for a post by custom field?
- Including Database Generated Pages in Site Search [closed]
- Create a post in custom post type using field in registration form after users submit form
- How to save media files under custom folder without changing wp-config.php or changing media settings
- How can I sort homepage by a meta value?
- Performance of storing multiple meta fields vs one JSON encoded field [duplicate]
- get_posts that match a user-specified value on a page
- How to Display pages with a Custom Fields in one page
- Run a check for multiple meta key values
- WordPress Rest API to call page data associate with custom meta
- Unsaved changes in metabox inputs not detected in the block editor
- Default Custom Field Value Automatically Update
- Saving Custom Field Data before Publish
- Limit of char count in WP custom fields
- Inserting data into MagicFields using mysql queries
- Custom Field box history
- Check & remove special characters in a field?
- Google map that plot’s several markers – each one with custom data
- WP All Import / Update stock quantity from multiple XML files
- Why am I getting a “Call to member function format() on a non-object” error?
- Hide a div when a custom field is empty
- How To Show Get Adjacent Posts If Posts Are Sorted By Custom Field
- How to calculate custom field value (average)
- Modify custom field from front end
- How to get all custom fields with some prefix in key?
- How to Convert Custom Fields from Text to Array?
- Custom Meta Box Upload Image Problem
- Use update_post_meta to older posts
- update_post_meta
- update_post_meta not working well
- Best way to insert a list of links into a post outside of the_content
- Products listing check if meta checkbox is checked
- Populate Product Regular Price with a calculated ACF Field Value
- WP meta_query args not working in function
- Line break description wordpress
- Update custom field on the fly
- Custom field disappeared from screen options
- Contact Form 7 List Building
- Link fields in User Admin list
- ACF – Compare user and post data
- Advanced Custom Fields deleting some code and adding code for a slider
- How to format the various types of custom fields?
- Get first URL from custom field, download and set as featured image on post publish
- Query postmeta values, and return multiple post_titles for common meta value
- How can I create a menu items from meta box based on users input
- sort a custom field base on the date or anything
- Add image custom attribute [closed]
- How do I access variables outside a function [closed]
- Retrieving custom field as shortcode
- Foreach giving one too many list items, how can I remove the last empty line?
- I used a custom field for header image and can’t get it to show up on posts
- How to add an ACF only for parent term?