To add a custom filter based on a meta field
Question
i want to filter posts from a custom post type in admin based on a meta field. i tried several ways ( here, here and here). It works in each case, BUT i have to click twice on the filter button.
At the the first filter action the option in the dropdown menu is well selected but there is no result. Parameters of URL are :
edit.php?s&post_status=all&post_type=program&action=-1&m=0&ADMIN_FILTER_FIELD_VALUE=25&filter_action=Filtrer&paged=1&action2=-1
Than i click again on the filter button and it works. Parameters of URL are :
edit.php?post_status=all&post_type=program&m=0&ADMIN_FILTER_FIELD_VALUE=25&filter_action=Filtrer&paged=1
it works when i remove the search parameter :
edit.php?post_status=all&post_type=program&action=-1&m=0&ADMIN_FILTER_FIELD_VALUE=25&filter_action=Filtrer&paged=1&action2=-1
Would you have an idea to get it work ?
Thank you
0
2 years
2020-12-22T04:10:20-05:00
2020-12-22T04:10:20-05:00 0 Answers
3 views
0
Leave an answer