Reply To: How to Add Thumbnail to "entry-header" div class

#6863
Ron
Keymaster

I’d like to point out that this functionality is not really specific to my themes and is more about modifying core WP functions. You may get better luck asking on forums like these:
https://wordpress.org/support/forum/themes-and-templates
https://wordpress.org/support/forum/plugins-and-hacks

For the “custom field” part, there’s already a plugin that could handle that:
https://wordpress.org/plugins/advanced-custom-fields/

For joining the content of the custom field to the post title, you could use the title filter. This is just a sample/pseudo code to show how it could be done.

add_filter( 'the_title', 'ra_custom_post_title' );

function ra_custom_post_title( $title ) {

   $custom_field = get_post_meta($post_id, $key, $single);

   if ( ! empty($custom_field) ) {
      $title = $custom_field . $title;
   }

   return $title;
}

Read more on https://codex.wordpress.org/Custom_Fields