Hello,
The header live search does not return same results through live search and the press button or press enter. It leads to confusion for the visitor.
Location : tagdiv composer > add element > header live search > general tab > Post type
Only one type of post can be defined. Could you allow many post types separated by a coma ?
2 situations :
(1) when post_type is leave empty
a) when we press enter or click on the research button, we are redirected to : site.com/?s=word&post_type=post
So the results only include post_type = post
b) whereas live search return results that include of kind of posts
(2) when post_type is defined with : post, other_post_type
a) when we press enter or click on the research button, we are redirected to : site.com/?s=word
So here, full results appear
b) but live search return no results at all
Could you fix this by allowing multiple post-types separated by a coma ?
Thanks for your help,
Regards.
Hello @sco!
If you leave the field empty, then the search will only show pages and posts.
Unfortunately, we do not have filters in this search functionality. We have some filters on the search page, as well as a template in the element as a posts loop or flex blocks.
Thank you!
Hi,
Sorry but there is a misunderstanding.
The header live search is perfect as it delivers all the results whatever the post_type when post_type is left empty.
The problem is that the visitor can see “live” the results but if he clicks on the search button or press enter, which many people do, then he is redirected to the url ?s=search-entry&post_type=post and results are missing.
Sorry again.. but it doesn’t make sense. Many visitors will instinctively click on the search button and press enter and then find no results to their query.
Your team should change the url to ?s=search-entry whenever post_type is left blank and problem solved.
Looking forward to your reply,
Thanks in advance for taking into account this demand,
Regards.
Hello sco,
This situation can be easily resolved, all you need to do is to edit the search cloud template and replace the post loop element with a flex loop element and let the filter empty – https://i.imgur.com/bL0rGQk.png this should resolve the problem.
Let me know the results!
Thank you!
Hi,
Thank you for your reply. I already use a flex loop listing for the search template… but it doesn’t work. Live search and search page results do not match as when we press enter or click the search button from the live search bar, we are redirected to an url with ?post_type=post.
The only way to solve this problem is I think to change the url to ?s=search-entry whenever post_type is left blank.
Hi,
I have the same problem with the search results described above. The live search displays search results from pages and posts. The search page only displays search results from posts.
Only in the composer, everything works as expected.
I´m using version 12.2 and the flex loop as described.
Is this bug resolved?
Thank you in advance.
There is still the same problem with the post loop element.
Have a look: https://zwa.stadt-tanna.de/?s=tanna&post_type=post
The upper one is the flex loop element and the other one is the post loop element.
This is how it looks in the composer: https://imgur.com/bfiF98p
Hi,
@Michaelgroth : Yes, same problem with both elements.
@Calin : You should fix this.
You just have to suppress the default ?post_type=post and instead have the results redirected to /search/xxx or /?s=xxx
How is this that complicated ?
Regards,
Hi Michaelgroth and sco,
We found what the problem is and a developer is looking into it. The problem seems to be only for the header live search element when the search button is used (or the enter button is pressed which activates the search button as well), it seems that the developers forgot to add the functionality for this one as well.
If you want to display results from several types of posts and not show wrong results until the fix is committed, you can use the Search Form element.
Thank you for persevering until we discovered where the problem is!