Closed gregallensworth closed 6 years ago
The tax_query
will now check whatever field is specified in the field parameter, e.g. term_id
, name
,slug
or term_taxonomy_id
This should cover every possible case.
The resulting loop is a bit larger and perhaps slower, but still quite acceptable. And this wider loop, also lays the groundwork for #3 in which each taxo may use a different weight coefficient.
At present,
score_taxonomy_relevance()
presumes that terms are IDs. Theget_the_terms()
loop checks the ID against the$queried_term_ids
but wouldn't check a slug.https://github.com/GreenInfo-Network/WP_Query_WithRelevance/blob/master/wpquery_withrelevance.php#L98
Have it also check the slug as being in the list, so one may freely use IDs and/or slugs.