Related Posts for WordPress
[Plugin: Microkid's Related Posts] Multiple Custom post types (2 posts)

  1. lukehm
    Posted 4 years ago #

    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?


  2. tcromwell
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Related Posts for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic