Title: derekdbess's Replies | WordPress.org

---

# derekdbess

  [  ](https://wordpress.org/support/users/derekdbess/)

 *   [Profile](https://wordpress.org/support/users/derekdbess/)
 *   [Topics Started](https://wordpress.org/support/users/derekdbess/topics/)
 *   [Replies Created](https://wordpress.org/support/users/derekdbess/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/derekdbess/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/derekdbess/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/derekdbess/engagements/)
 *   [Favorites](https://wordpress.org/support/users/derekdbess/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Click "Add Category" and "Add Custom Field" But Nothing Happens?](https://wordpress.org/support/topic/click-add-category-and-add-custom-field-but-nothing-happens/)
 *  Thread Starter [derekdbess](https://wordpress.org/support/users/derekdbess/)
 * (@derekdbess)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/click-add-category-and-add-custom-field-but-nothing-happens/#post-2354205)
 * Alright, after messing around with the functions file. I removed the line break
   after the IF statement and now everything is working. For some reason the functions
   file doesn’t like line breaks.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How can you remove title form widgets?](https://wordpress.org/support/topic/how-can-you-remove-title-form-widgets/)
 *  Thread Starter [derekdbess](https://wordpress.org/support/users/derekdbess/)
 * (@derekdbess)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/how-can-you-remove-title-form-widgets/#post-2260754)
 * I’ve already done this, but the idea is that some widgets we’d like to display
   the title, and other we wouldn’t.
 * And I’m still creating the theme from scratch. I’m new to wordpress so it’s been
   a fun adventure thus far.
 * Would there be a way to do it through the functions file?
 * This is what I have for one of the widgets:
 *     ```
       register_sidebar(array(
         'name' => 'pages sidebar',
         'before_title' => '<h3>',
         'after_title' => '</h3>',
         'before_widget' => '<div>',
         'after_widget' => '</div>'
       ));
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How can you display "custom fields" within "wp_get_recent_posts"](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/)
 *  Thread Starter [derekdbess](https://wordpress.org/support/users/derekdbess/)
 * (@derekdbess)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/page/2/#post-2259540)
 * Life saver! Thanks again!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How can you display "custom fields" within "wp_get_recent_posts"](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/)
 *  Thread Starter [derekdbess](https://wordpress.org/support/users/derekdbess/)
 * (@derekdbess)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/page/2/#post-2259537)
 * esmi,
 * I will definately do that.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How can you display "custom fields" within "wp_get_recent_posts"](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/)
 *  Thread Starter [derekdbess](https://wordpress.org/support/users/derekdbess/)
 * (@derekdbess)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/#post-2259533)
 * Thanks for the info Big Bagel! Much appreciated.
 * And yes, they were very fast replies. I’m just glad the community here is so 
   helpful. I just pray that I’m able to learn some PHP & WordPress development 
   from everyone.
 * Again, thank you all for the help. I wish there was a way I could repay you.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How can you display "custom fields" within "wp_get_recent_posts"](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/)
 *  Thread Starter [derekdbess](https://wordpress.org/support/users/derekdbess/)
 * (@derekdbess)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/#post-2259526)
 * Jackson,
 * The below code worked. So let me ask you all this. You say it’s bad practice 
   to use “post” as a variable. I grabbed this from the wordpress codex for a different
   section of a page where I’m displaying a custom field. Should I change this as
   well? `<?php echo get_post_meta($post->ID, "thumbnail", true);?>`
    ** This is
   the code that worked:
 *     ```
       <?php
       $args = array( 'numberposts' => '4', 'category' => 4 );
       $recent_posts = wp_get_recent_posts( $args );
       foreach( $recent_posts as $recent ){
       	echo '<li><div style="float: left;">' . get_post_meta($recent["ID"], "thumbnail", true) . '</div><span><a href="' . get_permalink($recent["ID"]) . '" title="Look '.$recent["post_title"].'" >Read More</a></span></li> ';
       }
       ?>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How can you display "custom fields" within "wp_get_recent_posts"](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/)
 *  Thread Starter [derekdbess](https://wordpress.org/support/users/derekdbess/)
 * (@derekdbess)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/#post-2259523)
 * No, it’s the correct name for the field.
 * And I used the code from the codex and thought I could just replace the code 
   for $post[title] with “get_post_meta” but it just doesn’t work. Like perhaps 
   get recent posts doesn’t pass the custom field data?
 * Perhaps I need a different tag inorder for it to work?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How can you display "custom fields" within "wp_get_recent_posts"](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/)
 *  Thread Starter [derekdbess](https://wordpress.org/support/users/derekdbess/)
 * (@derekdbess)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/#post-2259521)
 * esmi,
 * how would I go about dumping the recent posts array?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How can you display "custom fields" within "wp_get_recent_posts"](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/)
 *  Thread Starter [derekdbess](https://wordpress.org/support/users/derekdbess/)
 * (@derekdbess)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/#post-2259516)
 * Jackson,
 * Everything is displaying correctly except the custom field isn’t displaying. 
   I get custom fields to display on the actual page it self, but not when I’m listing
   multiple posts. I’ve been trying to figure this out for the past couple of hours
   and it’s really frustrating.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How can you display "custom fields" within "wp_get_recent_posts"](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/)
 *  Thread Starter [derekdbess](https://wordpress.org/support/users/derekdbess/)
 * (@derekdbess)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/how-can-you-display-custom-fields-within-wp_get_recent_posts/#post-2259514)
 * Jackson,
 * Just tried that and still it’s not showing the custom field within recent_posts.

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