Title: get_post_custom() issue
Last modified: August 20, 2016

---

# get_post_custom() issue

 *  Resolved [mc_raz](https://wordpress.org/support/users/mc_raz/)
 * (@mc_raz)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/get_post_custom-issue/)
 * I have tried everything to get the custom fields to display below my posts. I
   am very new to this stuff so I don’t know what I am doing wrong. I am trying 
   to modify my single.php by adding get_post_custom()
 * I have tried many variations but here is one of the examples of the loop in my
   single.php
 *  <?php
    if (have_posts()){ /* Display navigation to next/previous posts when 
   applicable */ if (theme_get_option(‘theme_top_single_navigation’)) { theme_page_navigation(
   array( ‘next_link’ => theme_get_previous_post_link(‘« %link’), ‘prev_link’ =>
   theme_get_next_post_link(‘%link »’) ) ); }
 *  while (have_posts())
    { the_post(); get_template_part(‘content’, ‘single’); 
   $custom_fields = get_post_custom(); comments_template(); }
 *  /* Display navigation to next/previous posts when applicable */
    if (theme_get_option(‘
   theme_bottom_single_navigation’)) { theme_page_navigation( array( ‘next_link’
   => theme_get_previous_post_link(‘« %link’), ‘prev_link’ => theme_get_next_post_link(‘%
   link »’) ) ); }
 *  } else {
 *  theme_404_content();
 *  }
    ?>
 * Was hoping someone could point out what I am doing wrong or do I need to modify
   another file as well like my functions.php?

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

 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/get_post_custom-issue/#post-2365409)
 * Try it with [the_meta()](http://codex.wordpress.org/Template_Tags/the_meta)
 *  Thread Starter [mc_raz](https://wordpress.org/support/users/mc_raz/)
 * (@mc_raz)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/get_post_custom-issue/#post-2365413)
 * I can’t believe you answered something in 2 seconds that I have been trying to
   figure out for hours. Thank you so much!
 * Could you point me in the right direction for styling the keys eg: make the keys
   bold?
 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/get_post_custom-issue/#post-2365417)
 * For that it’s best we have a link to your site.
 * Try putting this in your theme’s stylesheet style.css:
 *     ```
       .post-meta {
       	font-weight: bold;
       }
       ```
   
 *  Thread Starter [mc_raz](https://wordpress.org/support/users/mc_raz/)
 * (@mc_raz)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/get_post_custom-issue/#post-2365426)
 * I haven’t actually moved it across to the site that plan on using it just yet.
   I have an experiment site that is pretty much a frankenstein for all sorts of
   testing.
 * I have been at this all day so I will investigate the .post-meta tomorrow morning
   and see how I go. If I can’t figure it out I will post again.
 * Thank you so much for your help, I really appreciate it!

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

The topic ‘get_post_custom() issue’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [mc_raz](https://wordpress.org/support/users/mc_raz/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/get_post_custom-issue/#post-2365426)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
