Header live search bug

Posted in: Newspaper
Post count: 99

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.

Post count: 99

It will also be very useful to be able to exclude some pages (not all pages) such as the plans checkout page, the woocommerce checkout page etc… (exclusion using page id separated by a coma).

Regards,

Post count: 21065

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!

Post count: 99

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.

Post count: 35449

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!

Post count: 99

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.

Post count: 35449

Hi,
I just made a test on v12.2 RC version and for me seems to work correctly with the flex loop.
This theme update will be the next week and then this problem should be resolved.
Thank you!

Post count: 5

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.

Post count: 35449

Hi Michaelgroth, if you have only posts and pages, then you can use the posts loop elements, there is no need for the flex loop, and this should be displaying both, posts and pages.
Thank you!

Post count: 5

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

Post count: 99

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,

Post count: 35449

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!

Post count: 4

@calin did developer solve the issue?

Post count: 27744

Hello,

In the next update, should be solved it.
You can do some tests on staging using the rc12.3 version.

Thank you!

Viewing 14 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic.