Jump to content

* * * * * 1 votes

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

custom fields

  • Please log in to reply
2 replies to this topic

#1 vinofanten†



  • DMS Subscriber†
  • 8 posts
  • Country: Country Flag

Posted 13 September 2013 - 06:52 AM

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.


Attached File  wine_tasting_note.png   382.13KB   0 downloads


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

#2 vinofanten†



  • DMS Subscriber†
  • 8 posts
  • Country: Country Flag

Posted 13 September 2013 - 06:55 AM

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


Attached File  field_names.png   164.72KB   1 downloads

#3 Rob


    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 13 September 2013 - 08:22 AM



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...-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.

Also tagged with one or more of these keywords: custom fields