Home › Forums › Backend Issues (wp-admin) › Help for newbie – input test data on backoffice › Reply To: Help for newbie – input test data on backoffice
If you’ve created some custom fields and set the location to for example “posts”:
1. Go to an existing post or create a new one
2. Find the new custom fields (probably below the wyswyg editor)
3. Input whatever data you want in there
4. In your theme.. open up single.php (this is the template file WordPress uses for single posts)
5. Output the data.. if it’s a regular input field like a text, textarea, number, url etc. you can simply do
<?php the_field('field_name'); ?>. Make sure to change
field_name to the actual fieldname of the field you want to output.
For more advanced examples and to read up on more I recommend you check out the documentation where you can read and find code snippets for each individual field: http://www.advancedcustomfields.com/resources/
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!
🗓️ Just one more day until the next session of ACF Chat Fridays! Make sure to register for the latest updates on what’s coming in ACF 6.1!— Advanced Custom Fields (@wp_acf) March 30, 2023
📆 Friday 31st March 3pm UTC
👉 Register here - https://t.co/3UtvQbDwNm pic.twitter.com/7xtEJakeQN
© 2023 Advanced Custom Fields.