Forever Lonely
complete
Amrayu78
complete
Max Romanchenko
Hi!
The bugs you encountered are a consequence of the fact that Toolset does not have a built-in filter by post type (drama, movie, special). I fixed this, rewrote their code from the support forum, which did not work and led to these errors. I also checked other places where we use similar searches and fixed them too. Check, please
Amrayu78
Max Romanchenko: Can we integrate this functionality into Advanced Search? It'll be one less thing to maintain.
We will only need 3 items to be added to the results.
- How many times a Drama/Movie/SP was requested and for what language
- The Adopt Me button
- By default show the most requested at the top.
Max Romanchenko
Amrayu78: I completed steps 1-2 as you indicated in the screenshots.
Unfortunately Step 3 (By default show the most requested at the top.
) is impossible to perform, since the series does not have a “total requests” field, so such sorting will simply throw out the series from the database query (this is how WP Query works, posts that do not have a meta field by which the order/sorting is performed are not displayed in the results). That is, simply put, this sorting will display only Dramas / Movies / Specials.
As a workaround, I added a new "Most Requested" option to the Sort by dropdown. And if the user selects this option in combination with the “No” radio button in the “Subtitles” filter then the search will filter out 1392 lonely dramas, movies, specials, which corresponds to the total number of forever lonely items on the page
Here is the filtered link, sorting by the most requested ones and displaying only those that do not have subtitle projects:
Amrayu78
Max Romanchenko: Thanks Max! I think this works fine. You achieved what I wanted.