• Resolved kuldeepsinghpop

    (@kuldeepsinghpop)


    Hi thanks for wonderful plugin, i want know is it possible to just index or push settings of just one custom post type. Also can i set the featured images size, right now its choosing default thumbnail size.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hi there,

    For conditionally including or perhaps excluding posts, you could make use of the following two filters.

    apply_filters( 'algolia_should_index_searchable_post', $should_index, $post );
    apply_filters( 'algolia_should_index_post', $should_index, $post );
    

    You could use the 2nd parameter to check for their post type and if it’s not of the post type you want indexed, return false, otherwise, return true.

    For the featured images part, I believe this filter may be your friend, but I haven’t personally tested it thus far. Basically just return an array of the sizes you want indexed from your registered sizes.

    apply_filters( 'algolia_post_images_sizes', array( 'thumbnail' ) );
    
    Thread Starter kuldeepsinghpop

    (@kuldeepsinghpop)

    @tw2113 Thanks a lot Man ??

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Just need to index custom post type’ is closed to new replies.