How do I display custom fields?
I'm trying to add custom fields to my directory listings, and I'm not able to get the fields to display.
When creating the listings, I went down to the Custom Fields section, the "Add New Custom Fields" subsection, added the fields I wanted (phone number, address, website), assigned values to those fields, and clicked the "Add Custom Field" button. Those fields are now shown above the "Add New Custom Fields" subsection, so I'm guessing I did that correctly.
and that hasn't worked. Is there somewhere else that I'm supposed to add the tag, or am I even using it correctly?
Is there something I'm supposed to write in the text of the listings to tell them to display the custom fields?
Custom fields I believe should show up in Single.php by default. Single.php is the file user to show a single article.
Which theme are you using because not all themes are the same, so there could be something in the theme preventing this from working.
I've included a screenshot of where you find the code.
It would need to be within the loop if done within the code.
I'm using WPMU Dev's "Business" theme. Thanks for your help!
Attached is a custom single file for directory and the BP Business theme. Just upload it and it should work for you.
The code is included above the_content() although you can play around with that should you wish.
Thank you for taking the time to write the custom single file for me. I want to make sure I'm using it correctly.
This didn't have any effect on the displaying of the custom fields.
Should this also be changed?
Are there short codes I need to put in the main section of my listings in order to get the custom fields to display? Nothing I've read suggests that, but I want to make sure I'm not overlooking anything.
I created my custom fields on the page where I create each listing, and it's saved the fields I've created for subsequent listings (e.g. I don't need to create the "address" custom field each time I create a new listing). Should I be creating the custom fields in the CustomPress area instead?