Title: [Plugin: Microkid&#039;s Related Posts] Multiple Custom post types
Last modified: August 20, 2016

---

# [Plugin: Microkid's Related Posts] Multiple Custom post types

 *  [lukehm](https://wordpress.org/support/users/lukehm/)
 * (@lukehm)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-microkids-related-posts-multiple-custom-post-types/)
 * By the way I find this pluginreally useful and hope you are still developing 
   it.
    I’m having a problem with multiple cpts MRP_get_related_posts( $post->ID,
   false, true, array(‘post’, ‘weblinks’) ) returns nothing single cpt works fine
   MRP_get_related_posts( $post->ID, false, true, ‘weblinks’ ) Can you help? Best
 * [http://wordpress.org/extend/plugins/microkids-related-posts/](http://wordpress.org/extend/plugins/microkids-related-posts/)

Viewing 1 replies (of 1 total)

 *  [tcromwell](https://wordpress.org/support/users/tcromwell/)
 * (@tcromwell)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-microkids-related-posts-multiple-custom-post-types/#post-2429689)
 * I know that this is probably a day late and a dollar short, but the plugin developer
   was assuming the post_type would be a number and didn’t format it correctly. 
   If you do a search on /plugins/microkids-related-posts/microkids-related-posts.
   php for this …
 * `$query .= " AND wp.post_type IN (".implode( ",", $post_type ).") ";`
 * and replace with …
 * `$query .= " AND wp.post_type IN ('".implode( "','", $post_type )."') ";`
 * it should work.
 * Note: There are multiple occurrences of this in the code.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Microkid's Related Posts] Multiple Custom post types’ is closed
to new replies.

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

 * 1 reply
 * 2 participants
 * Last reply from: [tcromwell](https://wordpress.org/support/users/tcromwell/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-microkids-related-posts-multiple-custom-post-types/#post-2429689)
 * Status: not resolved