CPT's single page, gives 404 when search is in url
I’ve been running in circles to figure this out, so hoping that someone already had this kind of problem or at least can point me in the right direction. It’s an extremely weird thing, so I’ll try to explain it first.
– I have a CTP, let’s say “bread“
– The url to the archive page is “/bread/“
– When I search in this specific CTP, the url becomes “/bread/?s=query“
So far for the basics. More about the CTP:
– The “bread” CTP, has a custom field called “spread“. It’s plain text.
– There are more fields added to the CTP and taxonomies as well. But I think they have no impact on this issue.
So…when I search for a string that’s present in the titles of one of the breads, the browsing let’s me do this:
> home > to bread archive page > “ENTER SEARCH” > bread archive page > “CLICK PERMALINK” > to bread single page > super…
Now… when i search for a string that’s present in the “spread” field, browsing does this:
> home > to bread archive page > “ENTER SPREAD NAME” > bread archive page > “CLICK PERMALINK” > 404 ……eh??
So when I get the 404, the ?s=myspread is there…. when I manually remove that from the query string, I get the normal single page for the CTP as if all is fine.
Any clues? Must be the most complex way to explain a problem…..but still hoping anybody has a clue 🙂
- The topic ‘CPT's single page, gives 404 when search is in url’ is closed to new replies.