• Hi, paying member here…

    For the life of me, I cannot figure out why I cannot get the search functionality to include custom post types. Here’s some sample code:

    $shortcode = '[ajax_load_more post_type="post, gallery, list" search="Best Jackets" ]';
    
    echo do_shortcode( $shortcode ); 

    No matter what I do, that will only search posts, not galleries or lists.

    And the results are correct. They’re just all posts.

    If you’re wondering, when the custom post types are created, these parameters are being set (in functions.php):

    'exclude_from_search'   => false,
    'publicly_queryable'    => true,
    'capability_type'       => 'post',

    I can’t figure out what’s wrong. I can’t even figure out a way to troubleshoot it.

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Custom Post Types Not Searchable’ is closed to new replies.