• To whom it may concern,

    I basically want to as a hack append a query string to keep it simple at first to all results, but I may have to limit it to specific CPTs (custom post types).

    And then as a simpler ask, how can I return just 1 result for a given CPT per search? I have some CPTs that I don’t want to return unfiltered results.

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    I don’t understand what that first paragraph means, sorry.

    If you want just one result for a post type, I would recommend using a filter function on relevanssi_hits_filter hook that goes through the results and removes the unnecessary posts from post types. relevanssi_hits_filter is a simple hook to use, it just gives you an array of posts as a parameter and wants an array back.

    Here are some examples.

Viewing 1 replies (of 1 total)
  • The topic ‘append query string’ is closed to new replies.