Jump to content


This topic is now archived and is closed to further replies.


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

Recommended Posts


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.




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

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



Share this post

Link to post
Share on other sites



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.

Former PageLines Moderator, Food Expert and Raconteur

Share this post

Link to post
Share on other sites

  • Similar Content

    • werdnags
      By werdnags+
      Can anyone guide me please?
      I would like to learn how to achieve custom fields and going to give ACF plugin a try.  I have watched all the videos and read the documentation and all is good except I can find the template files for the pages and posts.  I believe I should be looking for the file single.php but what about posts?  Is the reason I can't find them because I am using a framework? Pagelines Framework?  How can I add my custom fields to the templates on Pagelines Framework?
      Any guidance would be appreciated please.
    • flourishdesignstudio
      By flourishdesignstudio+
      I am using PL5 as well as Advanced Custom Fields (AFC) to help add meta data to individual posts on our blog. However, where I am getting stuck is how to display the meta data on the actual public post page (frontend). For example, if we have posts that have a subject matter of plants then there are custom fields that the client fills out such as "Scientific Name", "Region", etc. I have used ACF before to display this meta data onto the loops section as well as in Revolution Slider or Essential Grid. However, I am not sure if there is a way to have this metadata display on the actual post page. Can you point me in the right direction? I am using a child theme so I wasn't sure if that meant I had to edit the functions.php file or if there was some other workaround that you knew of.
      Thanks so much!
    • PeriniNero
      By PeriniNero+
      We are building a Custom Post Type with Custom Fields and Custom Taxonomies.
      The only thing we dont understand is how to embed the Custom Fields including header tags and stuff in the Postloop (now we use a text-box below the postloop section but also SEO wise this is not best pratice).
      So we thought to copy the dms Postloop section to our child theme and rename this, to add an extra Postloop section to our theme. Is this the way?
      What exactly to adjust in those 3 files class.posts.php, section.php and style.less (at this point we know how to change the thumb LOL) and where to add the Custom Fields shortcodes?
    • dawsonbarber
      By dawsonbarber+
      I found that I'm unable to create and save custom field groups with WP Types when Single Bits is installed and active.
      I'm not sure if it interferes with any other functionality, but there's definitely an issue with custom field groups.
      When I deactivate Single Bits, I'm able to create custom field groups.
      Custom fields appear to be fully functioning after creating them and reactivating Single Bits, so that's good.
    • CjrMotley
      By CjrMotley+
      Ok, I'm having problems with my custom post types showing on my front blog page along with my regular blog post, here is a link to the custom post type (sample post) ==> http://www.definitiondjs.com/musiclibrary/this-is-a-post-title-test/ ..... my custom fields doesn't show, Why?
      Also, when I edit the custom post, all the fields change to blank (the previous text that was in the field is somehow deleted), why?
      Wordpress: 4.0
      Pageline Frameworks: 2.4.5
      cpt plugin is: WCK, here is a link to the site ==> http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/
      I linked snapshots of the custom fields area, which doesnt show after publishing or after clicking edit this post:
      Summary, I would like my custom post to display on my front page, along with my blog post.
      Also I would like to have an option to hide post from showing on front page, but I would like for all posts to show in search, archieved and category, even if hidden from the front page.
      Thanks in advance!