Title: Displaying Custom Fields
Last modified: August 22, 2016

---

# Displaying Custom Fields

 *  Resolved [gailwingate1](https://wordpress.org/support/users/gailwingate1/)
 * (@gailwingate1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/displaying-custom-fields-4/)
 * Hi, I’m very new to this, while I read through the documentation on how to display
   the fields, I just don’t understand the code and where to put it, and whether
   or not I need an array. I do see the fields when I add a new post, I just don’t
   understand how to display them.
 * I’m using the Category Post List Widget ([https://wordpress.org/plugins/category-post-list-widget/](https://wordpress.org/plugins/category-post-list-widget/))
   to display my posts. The plugin produces the following code for my page:
 * [cplw category=”19″ width=”500″ height=”500″ effects=”none” posts_to_show=”-1″
   time=”1000″ sort_by=”date” excerpt_length=”10″ thumb_width=”150″ thumb_height
   =”150″ date_format=”F j, Y” display=”title,excerpt” customfield_display=source
   customfield_display_name=no order=”desc”]
 * You can see I tried to display my custom “source” field, but it doesn’t show.
   There are two other fields that I need to display, “source_website” and “direct_link_to_content”
   which are both hyperlinks. I thought I would try to get the “source” working 
   then add the other two.
 * What do I do with the API’s that are provided by your plugin? I’m using the Nirvana
   theme, by the way. I also have Code Snippets and Simple Custom CSS plugins installed.
 * Any help is very much appreciated.
    Regards, Gail
 * [https://wordpress.org/plugins/custom-field-suite/](https://wordpress.org/plugins/custom-field-suite/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Matt Gibbs](https://wordpress.org/support/users/mgibbs189/)
 * (@mgibbs189)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/displaying-custom-fields-4/#post-5839934)
 * Please see the introduction: [http://customfieldsuite.com/docs/how-to-use-cfs/](http://customfieldsuite.com/docs/how-to-use-cfs/)
 * You will need to add PHP code to your template files. The shortcode you shared
   has nothing to do with CFS.
 *  [Alex](https://wordpress.org/support/users/alexgruppo/)
 * (@alexgruppo)
 * [11 years ago](https://wordpress.org/support/topic/displaying-custom-fields-4/#post-5840008)
 * Hi Matt,
 * I have the same problem: where exactly and on which file I can place the php 
   code to output the custom fields? I would really appreciate some detailed info
   since all info I found so far about this plugin are very generic….!
 * Thanks
 *  [Srikanth Kamath](https://wordpress.org/support/users/tskamath/)
 * (@tskamath)
 * [11 years ago](https://wordpress.org/support/topic/displaying-custom-fields-4/#post-5840009)
 * hi, may be this will help
 * using the plugin “ShortCode Exce PHP” we can create a shortcode, which we can
   then insert in the post or page. [get_Field arg=”custom_field_slug”]
 * create a shortcode as detailed in [my post](http://tskamath.pactindia.net/technology/wordpress/shortcode-get-custom-field/)
   
   pls note, I am using the same to get custom field values from the Post ItSelf,
   in case you want the CF from other post then, modify the following
 * Btw I am trapping the error.. code will display the error and also the available
   fields on the post, so that you can correct any typo, etc. [ScreenShot](https://www.facebook.com/ts.kamath/photos/a.363755250493618.1073741832.315215795347564/363755253826951/?l=8a42a9edc6)
 *     ```
       $AllFields = CFS()->get(false);
       $AllFields = CFS()->get(false, $post->ID);
       // $AllFields = CFS()->get(false, 492); // the post id is 492 //
       $getFields = CFS()->get($arg); // need to change $getFields = CFS()->get($arg, 492);
       ```
   
 * is such a case its better to pass two arg to the short code
 *     ```
       extract(shortcode_atts(array('arg' => 'default'), $atts)); /change to
       // extract(shortcode_atts(array('arg1' => 'field-slug', arg2 => 'post ID'), $atts));
       ```
   
 * of course, pls feel free to edit to your content. “ShortCode Exce PHP” allow 
   a fast interface also to check the PHP..
 *  [Alex](https://wordpress.org/support/users/alexgruppo/)
 * (@alexgruppo)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/displaying-custom-fields-4/#post-5840011)
 * Hi tskamath,
 * Thank you for your reply but the shortcode does not seem to work.
    Is there any
   way that I could contact you in private?
 * As I need to make this work for a website hosting over 700 events.
 * Thanks,
 * Alex
 *  [Srikanth Kamath](https://wordpress.org/support/users/tskamath/)
 * (@tskamath)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/displaying-custom-fields-4/#post-5840012)
 * Yes Why Not.. I would not like to list my email ID on public, hence pls visit
   the blog and leave a comment or visit the about page > contact my mail is listed
 * [http://tskamath.pactindia.net/technology/wordpress/shortcode-get-custom-field/](http://tskamath.pactindia.net/technology/wordpress/shortcode-get-custom-field/)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Displaying Custom Fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-field-suite.svg)
 * [Custom Field Suite](https://wordpress.org/plugins/custom-field-suite/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-field-suite/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-field-suite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-field-suite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-field-suite/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [Srikanth Kamath](https://wordpress.org/support/users/tskamath/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/displaying-custom-fields-4/#post-5840012)
 * Status: resolved