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

    (@msaari)

    You talk of categories, but your code is sorting by post type. Which one it is? If it’s about categories, then you need to sort by category, not by post type in the relevanssi_hits_filter function. If the post_type is correct, I’d check that the names of post types are correct.

    Thread Starter devGOD

    (@devgod)

    it’s post_type. can weight be added to a post_type via a filter?

    Thread Starter devGOD

    (@devgod)

    what I want to happen is if the post_type is Section1 – 4 show those first before anything else

    Plugin Author Mikko Saari

    (@msaari)

    In that case your code is correct, and is the best way to make sure of it. I wouldn’t mess with weights, if strict ordering is what you want.

    If the type arrays are blank, then I’d check that the name of the post type is exactly correct. Put a var_dump($types); before the merge and see what the array has eaten.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom weighted filter search’ is closed to new replies.