Support

Search results for ""

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

Custom Post Taxonomy Showing ID's Instead of Titles

Hello,

Similar to this issue: https://www.admincolumns.com/forums/topic/filter-drop-down-showing-ids-instead-of-labels/ – I’m trying to show a custom taxonomy and also use this as a filter. Using the default field type, it picks up the tax ID just fine and the filter list with ID’s shows, but this is not very helpful. I need it to show titles. Screenshot here: https://cl.ly/jJRo – this is for my Maps locations taxonomy… I try to set it to Term Names and Post Titles, but all I see then is an empty column.

I’ve got a Pro license. Any ideas?

Thanks!
– Jonah

7 years, 8 months ago
Stefan van den Dungen Gronovius
Developer

Hi Jonah,

Can you send me a screenshot of the setting for your taxonomy column?
Did you use the taxonomy column and select the correct taxonomy?
And did you use the default WordPress way to create the taxonomy and relate it to your post type?

7 years, 8 months ago
Jonah

Hey Stefan,

Thanks for your reply. Here is the setting for my tax in Admin Columns: https://cl.ly/jKPn

The tax was setup automatically via a plugin, so this is probably the issue… Do you know what I should check to fix this?

Thanks!
– Jonah

7 years, 8 months ago
Stefan van den Dungen Gronovius
Developer

Hi Jonah,

Thanks for the information. Can you tell me which plugin you used to relate the taxonomy to the post type? In this case the term ID is stored to a post type when normally the post ID is stored to the taxonomy, when you use the default WordPress logic to relate taxonomies to post types. You could try to set the field type to ‘Term Name (Term ID’s) but if I’m correct this option only works if the relations is made by the Pods plugin.

Anyway, like the key you use already suggest, you only get a term ID from the custom field, and since our plugin does not now anything about the context, it just displays it as an number on your screen. We already have an integration addon for ACF that works with these kind of relation and we’re working on more integrations like Pods and Toolset Types but for now, you’ll have to alter the value yourself by using one of our filters.

Have a look at this page and the example, it will point you in the right directions.
https://www.admincolumns.com/documentation/filter-reference/cac-column-meta-value/

You just have to retrieve the term based on the ID and return the name of the term instead of the ID.

7 years, 8 months ago
Jonah

Hey Stefan,

Thanks for the reply! I ended up figuring it out. I just needed to select Taxonomy as the field type instead of Custom Field. Duh! It works great now as expected. Thanks for your help and go ahead and close this out.

– Jonah

7 years, 8 months ago
Stefan van den Dungen Gronovius
Developer

Hi Jonah,

Thanks for the feedback, I will close this ticket.

7 years, 8 months ago

You must be logged in to reply to this topic.