• I’m just transitioning to 2.0, but I can’t seem to get search working
    – nothing shows up in the results. Search works for normal posts and
    any custom post type I create with a different plug-in, but not in
    MF2.
    (and, ahem, of course “exclude from search” is not checked in the post
    type options)

    What could be the problem?
    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter poisonborz

    (@poisonborz)

    I eventually solved this by applying a search filter over the original
    query:

    function searchfilter( $query ) {
    if ( isset( $query[‘s’] ) ) {
    $query[‘post_type’] = array(‘posttype1′,’posttype1’);
    }
    return $query;
    }

    add_filter(‘request’, ‘searchfilter’, 1);

    I wonder why it won’t work without it though…

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Magic Fields] Can't search custom post types created with MF2’ is closed to new replies.