Home › Forums › Front-end Issues › Customising a post › Reply To: Customising a post
Part of this is outside of ACF and that’s having a template for a post in a specific category. For this you should take a look at https://codex.wordpress.org/Function_Reference/wp_get_post_categories and https://codex.wordpress.org/Function_Reference/get_template_part. Basically you need to see what category your post is in and then either get a standard content template or a separate content template based on that.
I would probably use a custom post type instead, https://codex.wordpress.org/Post_Types
As far as showing the label and the value of a field, this is the basics
$value = get_field('field_name');
$field = get_field_object('field_name');
echo $field['label'],': ',$value;
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
ACF wouldn’t be so widely used in WordPress if it didn’t have some pretty amazing capabilities. In this article, we look at a few of the features we’ll discuss during “7 things you didn’t know you could do with ACF” at #WPEDecode later this month. https://t.co/5lnsTxp81j pic.twitter.com/Yf0ThPG1QG
— Advanced Custom Fields (@wp_acf) March 16, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.