Parsely / wp-parsely

The official WordPress plugin for Parse.ly - makes it a snap to add the required tracking code to enable Parse.ly on your WordPress site.
https://wordpress.org/plugins/wp-parsely/
GNU General Public License v2.0
64 stars 32 forks source link

PCH Related Posts: Support slugs in search #2968

Open acicovic opened 5 days ago

acicovic commented 5 days ago

Is your feature request related to a problem?

A customer reported not getting results by section in PCH Related Posts.

Digging deeper, we found that the customer's metadata is registering sections with the category's slug, not the name field which we currently use to fetch results.

Describe the solution you'd like

There are a few possible solutions:

  1. If possible, query with both name and slug in one call, and show the results. There's a slight possibility of getting some unwanted results.
  2. Perform the name query as usual, and if no results are returned then query for slug. There's a slighter chance of showing unwanted results, but we use 2 calls and latency increases for results by slug and when there are no results at all.
  3. Provide a setting so customers can set whether the query should be made by name or slug. We could also introduce an option to query both if we think it could be useful, especially if it's possible with one call. This solution eliminates the possibility of showing potentially unwanted results, but it's considerably more work for something that isn't currently a widespread need.