Title: Recipe posts compatibility
Last modified: August 24, 2016

---

# Recipe posts compatibility

 *  Resolved [JohannCR](https://wordpress.org/support/users/johanncr/)
 * (@johanncr)
 * [11 years ago](https://wordpress.org/support/topic/recipe-posts-compatibility/)
 * Hi,
 * Is there a way that the related posts shown also include recipe posts made with
   another plugin ? (in my case wp ultimate recipe plugin)
 * Is there a way to modify the zemanta_related_posts() function to do so ?
    If 
   so where and how can we do that ?
 * Thank you for your help !
    Cheers
 * [https://wordpress.org/plugins/related-posts-by-zemanta/](https://wordpress.org/plugins/related-posts-by-zemanta/)

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

 *  [PetraP](https://wordpress.org/support/users/petrap/)
 * (@petrap)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/recipe-posts-compatibility/#post-6100402)
 * Hey Johann,
 * thanks for reaching out and really sorry for this overdue reply!
    I think the
   following could work. Go to “Plugins”-> “Editor” and on the top right menu choose
   Related Posts by Zemanta to edit. Find the init.php file and then find the “function
   wp_rp_add_related_posts_hook($content)” and there in the `if ($content != "" &&
   $post->post_type === 'post' && (($options["on_single_post"] && is_single()) |
   | (is_feed() && $options["on_rss"])))` line add ” || recipe” so that you get `
   if ($content != "" && $post->post_type === 'post' || 'recipe' && (($options["
   on_single_post"] && is_single()) || (is_feed() && $options["on_rss"])))`.
 * Don’t forget to save the changes (and also, always make a backup, just in case–
   it is better to be safe than sorry) and let me know how it goes.
 * Keeping my fingers crossed that it will work.
    Take care and have a nice day,
   Petra
 *  [suzannechang](https://wordpress.org/support/users/suzannechang/)
 * (@suzannechang)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/recipe-posts-compatibility/#post-6100406)
 * Hi, im trying to include recipe posts also in the query for relates posts. how
   can i do that?
 *  Thread Starter [JohannCR](https://wordpress.org/support/users/johanncr/)
 * (@johanncr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/recipe-posts-compatibility/#post-6100421)
 * Hi,
 * I too am late to respond, but I managed to make it work with your help Petra :
 * – the function is in fact zem_rp_add_related_posts_hook($content)
 * – I had to add parenthesis for it to work (otherwise it puts two related sections
   on the posts) :
    if ($content != “” && ($post->post_type === ‘post’ || ‘recipe’)&&((
   $options[“on_single_post”] && is_single()) || (is_feed() && $options[“on_rss”])))
 * Thank you for your help !
    Cheers Johann.

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

The topic ‘Recipe posts compatibility’ 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/)

 * 3 replies
 * 3 participants
 * Last reply from: [JohannCR](https://wordpress.org/support/users/johanncr/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/recipe-posts-compatibility/#post-6100421)
 * Status: resolved