Title: Compatibility with ACF
Last modified: August 22, 2016

---

# Compatibility with ACF

 *  Resolved [hariharakumar](https://wordpress.org/support/users/hariharakumar/)
 * (@hariharakumar)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/compatibility-with-acf-1/)
 * Hi, I am using ACF(advanced custom fields) plugin i want to display custom field
   in related posts shown by zemanta. Its not working for me, i looked into code
   it uses get_post_meta() but i want to use the_field() instead of that. Please
   tell me how i can show custom field in related posts. Thanks
 * [https://wordpress.org/plugins/related-posts-by-zemanta/](https://wordpress.org/plugins/related-posts-by-zemanta/)

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

 *  [PetraP](https://wordpress.org/support/users/petrap/)
 * (@petrap)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/compatibility-with-acf-1/#post-5282050)
 * Hey,
 * thanks for reaching out but I am not sure what exactly are you trying to do? 
   Do you wish to change the thumbnails by using the custom fields? If yes, then
   first, go to your create-new-post page or — even better — in one of your previous
   already-published-posts. On the right top corner you should see the ‘Screen Options’
   button; click on it for the drop-down menu to open. After that, tick the box 
   next to ‘Custom Fields’.
 * Now you should be able to see a new box below the editor called ‘Custom Fields’.
   Create new custom field, name your image that you would later like to use it 
   as a thumbnail for this specific post (something like “My thumbnail”), enter 
   the URL of the image (to value) you would like to use and finish with the click
   on the button “Add Custom Field”. Of course, don’t forget to save this draft,
   or publish the post when you’re ready.
 * After that, visit the settings of (y)our plugin and scroll down to the bottom.
   The option called “Use custom field for thumbnails” should now be available, 
   tick the box next to it, and select the value you’ve set up before (if you used“
   My thumbnail”, select that one).
 * Once you have set this up, you just add a Custom Field with every new post, set
   the image you want to use for the thumbnail, while the name stays the same. Also
   worth noting is that you should keep the images you want to use for thumbnails
   as square as possible and that they’re not too big. The perfect size would be
   151×151 pixels (or bigger), but that is not that crucial.
 * Hope this helps, take care an have a nice day,
    Petra
 *  Thread Starter [hariharakumar](https://wordpress.org/support/users/hariharakumar/)
 * (@hariharakumar)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/compatibility-with-acf-1/#post-5282083)
 * Hi, What you said is right. But i am using Advanced Custom fields plugin ([http://www.advancedcustomfields.com/](http://www.advancedcustomfields.com/))
   in my blog. When you use this plugin, custom fields appear at bottom of the post
   editor. But to display that custom fields on website we use **the_field()** (
   [ link](http://www.advancedcustomfields.com/resources/the_field/)). But in your
   plugin code it is **get_post_meta()**. Due to which it is not working for me.
   Please tell me how to make it work with **the_field()** function. Thanks.
 *  [PetraP](https://wordpress.org/support/users/petrap/)
 * (@petrap)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/compatibility-with-acf-1/#post-5282139)
 * Hey,
 * you will need to edit the “thumbnailer.php” file. Go to line 371 (get_post_meta(
   $related_post->ID, $options[“thumbnail_custom_field”], true);) and change it 
   like this:
 *     ```
       $thumbnail_src = get_field('my_personal_thumbnail_field', $related_post->ID); //get_post_meta($related_post->ID, $options["thumbnail_custom_field"], true);
       ```
   
 * -> my_personal_thumbnail_field is the name of the field you’d like to use for
   thumbnails – it’ll be hardcoded. Please note that this won’t be visible in the
   plugin settings but you still need to go there and tick the box next to “Use 
   custom field for thumbnails”…[it doesn’t matter which field you choose here in the drop-down menu](http://i.imgur.com/xVLDlOe.png).
 * We would like to point out that this is a hack and might have some unpredictable
   consequences, so unfortunately we cannot guarantee it will work under all circumstances(
   themes,…). And don’t forget, this change will be overwritten when you update 
   the plugin!
 * Take care and enjoy the weekend,
    Petra
 *  Thread Starter [hariharakumar](https://wordpress.org/support/users/hariharakumar/)
 * (@hariharakumar)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/compatibility-with-acf-1/#post-5282141)
 * It worked like a charm thanks for your code. I will remember not to update the
   plugin thanks once again.

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

The topic ‘Compatibility with ACF’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/related-posts-by-zemanta_7b9a7c.svg)
 * [Related Posts by Sovrn](https://wordpress.org/plugins/related-posts-by-zemanta/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/related-posts-by-zemanta/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/related-posts-by-zemanta/)
 * [Active Topics](https://wordpress.org/support/plugin/related-posts-by-zemanta/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/related-posts-by-zemanta/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/related-posts-by-zemanta/reviews/)

## Tags

 * [custom field](https://wordpress.org/support/topic-tag/custom-field/)
 * [image](https://wordpress.org/support/topic-tag/image/)

 * 4 replies
 * 2 participants
 * Last reply from: [hariharakumar](https://wordpress.org/support/users/hariharakumar/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/compatibility-with-acf-1/#post-5282141)
 * Status: resolved