Conflict: problem with Search for Posts and CPT in the same time
-
Hello,
Polylang free version: 2.7.3
WP 5.4.2
Oxygen Builder 3.3.1As i’m developing my site, I first work in English and when all will be finish in English, translators will work on that. Despite this, I had Polylang installed and activated.
On my site, i use CPT UI and ACF Pro. I created an advanced search form where users could search for the normal WP posts as well as some of the CPT i have. I did this with a paid online tutorial (with no plugin). In short, after typing the keywords in the form, the user will have to tick checkboxes among Posts, Audio Shows, Video Shows to filter down his search. The tutorial author said that whether or not the user doesn’t tick any checkbox or tick all checkboxes at once, search will be made through all posts, and all visible CPT.
I tested my advanced custom search with dummy content in posts and in 2 CPTs. My goal is to give the user the possibility to search in my Blog posts, in my Audio Shows and in my Video Shows.Here is the problem i found when testing this advanced custom search form:
I searched a keyword of my only post title in “audio_show” CPT. I got proper search result when i check “audio_show” and “video_show” boxes (or only “audio_show” checkbox). However, when i checked no boxes or even checked all boxes, the search results didn’t not display any result related to post title of “audio_show”. And this was not normal.To be able to identify the source of the problem, i contacted the tutorial writer and first thought there was something wrong either in the way i implemented it or in his tutorial. I re-created the same advanced custom search form in a clean environment with only Oxygen, CPT UI and ACF, and tested again with some dummy WP posts and CPT posts. I observed that i didn’t have the problem (mentioned above). All was working as expected.
Then finally after days of investigation, i decided to deactivate all my plugins, and reactivating them one by one and tested my search form each time in between. The result is that my problem (mentioned above) appeared when i activated Polylang.Hopefully, you will be able to identify where this comes from and will release an update soon to fix this problem.
Thanks.
- The topic ‘Conflict: problem with Search for Posts and CPT in the same time’ is closed to new replies.