ACF Frontend Display is a plugin that can help you show the custom fields or meta_key on frontend without coding or knowing PHP at all.
To use ACF Frontend Display, you need to remember the shortcode of the plugin, which will help you show the fields.
Show ACF Custom Fields
To show the fields from ACF, you can use this following shortcode:
[cats_field group_id="" field="" auto_loop="" excerpt="" post_id=""]
- group_id: This is the ID after you create field group, you can follow this article to get your desired group ID
- field: If you want to show the fields one by one, you need to use the field’s slug to let the shortcode display that field on the front end.
- auto_loop: In the case you want to show all the fields at once, you need to input yes or no (you can leave it blank too)
- excerpt: If you want to exclude specific fields from showing on the result, you need to put the field’s slug here, separate by commas.
Show WordPress’s Meta_key
Beside showing field from ACF, you can show the meta_key (WordPress’s custom field) of specific post/page/category…etc with the following shortcode:
[cats_meta_key meta_key="" post_id=""]
- meta_key: use the meta_key ID of the post, follow this article to get your meta_key name
- post_id: if you’re on the post 4 but you want to show meta_key from Post ID 1, then you put the post_id=1 there
Real Usage Cases
To help you understand better. We have created the specific usage cases for you.
- Show all fields at once
- Show all fields but exclude some
- Show all fields from specific post/page ID
- Show field, one be one from current post/page
- Show field on sidebar/widgets
- Show field of custom post types (like WooCommerce’s Product)
- Show fields of taxonomy (like tags, categories descriptions…)
- Show custom meta_key from current post
- Show custom meta_key from specific post
- Show custom meta_key of taxonomy on sidebar