It depends on how you added the custom fields. If you used a custom fields plugin, you may be able to call a plugin-specific function. For example, with ACF, you can call get_field('fieldname')
to retrieve one specific custom field.
If you’re not using ACF (or even if you are), as long as your fields are stored as postmeta, you can do something like
<?php
if(get_post_meta($post->ID, 'quality_score', true)) {
echo get_post_meta($post->ID, 'quality_score', true);
}
?>
or format more heavily, i.e.
<?php
if(get_post_meta($post->ID, 'quality_score', true)) {
$quality_score = get_post_meta($post->ID, 'quality_score', true);
echo '<div class="quality">' . $quality_score . '</div>';
}
?>
Related Posts:
- Custom Post Type Data in Sidebar widgets?
- Hide custom post type field from author?
- Many to Many Relationship between Two Custom Post Types
- Sorting a query by custom field date
- echo value from ‘select’ field type into page template using cmb2?
- wordpress plugin error handling
- Creating Photo Gallery System with Custom Post Type
- Set post title from two meta fields
- How to solve suspected memory issue in custom WordPress loop?
- Trying to save custom post type from frontend partially working
- Custom Taxonomy order by Custom Field
- Comparing timestamps in meta query doesn’t work
- Is there any performance consideration when using Custom Post Types?
- Custom Post Type Navigation on Custom Field
- how to interconnect custom post types?
- WP All Import – Using Xpath to set a select value
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Automatically update custom field in all posts of a custom post type
- search also in taxonomy, tags and custom fields
- Filter custom posts using auto populated dropdown selectors
- Querying Two Custom Post Types with OR Not Working
- How can I get the number of custom post type posts that have a specific attachment image set?
- Bulk Update Custom Fields for Custom Post Types
- Add custom field to Posts and sort by it
- Two Custom Post Types Many to Many Relationship
- Including metaboxes from custom post types in global search — continued
- Show image gallery from a custom field
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- filter custom post in rest api with custom function
- Custom Fields for Custom Post [closed]
- Displaying All Posts of a Custom Post Type in WordPress Multisite Backend
- Adding Page Templates to post but it ignored it
- Is there any way to add a “custom field” to the CPT archive page?
- don’t publish custom post type post if a meta data field isn’t valid
- WebP Fallback for Inline Background Image in Style Attribute
- How can meta boxes be added to “unknown” custom posts?
- Check if post with same meta value exists
- Custom posts type for individual pages?
- custom post data – how to
- Get Post Terms of Current Post (selected taxonomy term) – How to get only the taxonomy value and not “Array ( [0] => taxonomy term )” in the frontend?
- WP Query ‘posts_per_page’
- Custom Post Type Metadata Not Saving
- Editor / Add Media: Is it possible to only allow galleries?
- What do the numbers mean at the end of add_action(‘save_post’)…?
- A meta box (in a custom post type) with two different type of fields
- Many to many to many custom post relationships
- Custom Field not saving in WordPress
- How do I replace the post title with a custom field?
- Custom Post type loop with ACF not displaying properly
- Reusable metabox backend and frontend
- How to display wp_post by custom field value?
- How can I output WPAlchemy repeating fields meta values in my page template?
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- Custom post types category
- Let users upload image(s) to the post from front end
- How to import database table as custom post type and custom fields?
- Custom Taxonomy dont save in a frontend form for post a custom post
- Update custom field value
- Insert custom fields to a custom post type
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- Fill custom fields when saving custom post types
- Should i use custom post type for a custom footer?
- Use Gravity Forms and a Shopping Cart for output to Freshbooks for an Estimate [closed]
- A sports wordpress website
- How do I ensure that post_type and Taxonomy use the same slug?
- How to make an API call to a custom post type but filtering by meta value?
- Migrate Custom Post Type with Custom Fields data and parent child order
- Custom taxonomy terms as children of multiple custom post types
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Custom Form / Search with Custom Post Type Data
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- Custom Column in CPT admin table not updated after Quick Edit save
- Display Custom Field or Custom Taxonomy in front page /post/product
- How to access repeater field of a custom field?
- PHP Warning with Custom Fields
- Custom post types & Pages hierarchy – Error 404
- filter rest api post by a acf filed
- How to prepend text to custom field value A, but only if custom field value B matches a certain string?
- Custom post type that lets users create a set of posts?
- How do I extract the contents of a CPT’s custom field for all posts?
- Delete custom post type metadata without deleting the post in admin area
- How to delete comma from the end of results? [closed]
- Publish post and create additional posts with same content
- Creating multiple CPT posts from one Gravity form
- Converting a checkbox filter for custom fields to a dropdown
- Function not pulling image or text from custom post type
- Order Custom Posts by Several Fields
- Custom field totals
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- Repeatable custom meta select boxes
- 404 on Pages for Custom Post Type & Query_Posts
- How to show animal lineage/pedigree in WordPress?
- WP_Query arguments: Loop through custom post type – get all entries except excluded meta_key?
- Types plugin isn’t compatible with my custom post type
- Show Posts in Vertical Tabs with Scrollbar
- How do I filter a custom post type loop by a field?
- Custom Post type as Taxonomy
- Display div based on Group metabox selection [closed]
- Custom Sort Order for Custom Post Type Taxonomy