I have a custom post type called “trucks”. These posts always exist as a list on a specific page. Let’s call that page:
The problem is that their content is searchable. When you search and it lists results, it obviously finds the custom posts and provides a link to that custom post, as if it is on its own page. But really, ALL the trucks exist on ONE page. So instead of the permalink in the search results being:
I need to make sure that the permalink simply sends them to the page without the %postname% tacked on to the end. Essentially, every permalink for the truck custom post type should be:
I have searched and searched, and I can’t figure out a rule that removes the %postname% for the permalinks of a specific post type.