1) I’ve created a custom taxonomy called ‘locations’, populated with names ‘location1’, ‘location2’, etc.
2) I’ve created a taxonomy ACF field called ‘location’, with multiple select input, based on the custom taxonomy ‘locations’.
3) I’m using this code to retrieve the selected locations and display them in a widget associated with the post:
My problem is that when I click on a location name URL (which is correctly displayed like: “http://www.mywebsite/locations/location1”), it leads to a ‘not found’ page.
(Doing the exact same thing with the same php code for other custom taxonomies, not using ACF, works fine.)
When I check the ‘locations’ custom taxonomy table, nothing seems to be saved, hence the problem…
Do you have posts assigned to the terms in the locations.
I just tested this than then the terms don’t have posts then I get a not found message, indicating that there are no post to be found, not that the page is not fount when I add a post in the term then the page shows my post.
It’s very weird, yes I had posts including the terms, since the link above is generated from posts themselves.
But for whatever reason it seems to be working now. I don’t know what happened.
Thanks anyway! 🙂
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users