• 0

How to display values entered in custom fields on single post pages.


Question

Posted · Report post

I have a website using the Academy theme based on DMS, and will be posting wine tasting notes on the site.

 
Instead of posting wine tasting notes as orginal posts in Wordpress, I have created a custom post type called "wines_tasting_notes" using the Advanced Custom Post Types plugin in Wordpress. I have also created custom fields for this custom post type (using another plugin), but I can't figure out how to display values I enter in the custom fields in the posts that I upload in this new custom post type.

Now, when I click on a post title in the post loop (on my website), the post opens with, what I believe is, single.php as the template. My question is how can I create a new template for single post in the wine tasting notes CPT, with the standard post type as a base.
 
My second question is how I can display values from my custom fields and like in the image below? Do I have to tweak a .php file, or do I have to create a template in DMS? Or is there a plugin for tweaking the look of a single.php page (e.g. if I create a single-wines.php for wine posts). Or do I have to do this using code?
 
Custom fields in this case are:
- type of wine
- grape variety
- region of production
- etc

 

See attached image.

 

[attachment=1523:wine_tasting_note.png]

 

Hope that someone can help me, as I have googled this issue and found nothing of help. :)

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

Posted · Report post

Here is a screen of the field names used for the custom fields.

 

[attachment=1524:field_names.png]

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hello,

 

Unfortunately, you're using a third-party product as the child theme and we can't support any products made by any other developers.  However, the team at PageLines Academy are very good and will happily support your efforts.

 

As for the second question, I've not tested this, but it appears to be a well-used, popular and well-maintained product that should work with DMS.  http://wordpress.org/plugins/advanced-custom-fields/

 

It would allow you to create the custom fields.  As for displaying them in the child theme, they might be able to assist you more with that as well, if the plugin doesn't integrate.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now