WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. lukehm
    Member
    Posted 2 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?
    Best

    http://wordpress.org/extend/plugins/microkids-related-posts/

  2. tcromwell
    Member
    Posted 2 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

About this Topic