Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics

Filter menu shows term_id instead of name (Pods 2.0, relationship field column)

I’m using WordPress 4.0, Pods 2.4.3, and Admin Columns Pro

In my database I have several pods that contain relationship fields related to other pods (e.g. the “staff” pod contains a field named “department” that is related to the “staff_department” pod).

In admin view, the column for “department” displays the names of each department as expected (e.g. “Accounting,” “Communications,” “Human Resources,” etc.). However, when I enable filtering on this column, the filtering drop down menu displays each department’s term_id instead of its name (e.g. “11” vs “Communications”).

How can I get the filter drop down menu to display the name instead of the term_id?

8 years, 1 month ago

Never mind, I was able to figure it out using my_cac_filter_label.

If I may make a suggestion, it would be a lot easier if I could change the label text within the Admin Columns settings page itself instead of editing the functions.php file. Maybe a simple “database field to be displayed” control could be added into an upcoming release? :D

8 years, 1 month ago

Thanks for your report! Just to clarify: the value in the columns is the term name, and the value in the filtering dropdown is the term ID?

8 years, 1 month ago

Yep. It’s an easy workaround, but right now if I modify the column names, the filter code will need to be updated as well. An admin screen for this would be convenient!

8 years, 1 month ago

One way to fix this would be to introduce a Taxonomy type for Custom Fields. This way we actually know what the value contains, a term ID, and can display the label accordingly.

7 years, 11 months ago

You must be logged in to reply to this topic.