I am developing a plugin that basically consists of a CPT that lists certificates (multiple) for their respective Customers (User Role). I’ve done everything that should be done:
– The “Certificates” CPT
– The “Customer” User Role
– The “Company” Taxonomy
– Carbon Fields for custom fields (via composer dependency)
– I made the field that relates the Client to his Respective Company, because when creating posts / Certificates we will have the field of association to it.
– I created the rules (filters – pre_get_posts) to list posts only from the company to which the user Customer is related.
– AND THE MOST DRASTIC OF EVERYTHING – I chose the WP Admin UI itself to show this, and now I’m having trouble filtering, such as:
– – It is impossible to combine filters and search fields with Columns Sortable ordering from custom fields. Only title columns sortable works with search and filter combination.
I think this decision to use the ADMIN UI has complicated me a lot. I’m thinking of creating a separate page and get this through WP’s REST API with JS.
Or is it possible to combine the filters in the ADMIN UI? Either option works for me. I would like someone’s help because I don’t know much about SQL and how I could combine these filters.
In the images i show an example of the ADMIN view that sees all the Certificates:
|
The combination of Dropdown Filters with Search and columns ordering of the Title Works perfectly:
|
But when I try to sort by the other columns everything disappears. see:
|
When I order without using the search combination, it works normally.
The main code is Here:
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com