NO BUG: No result showing list-style if query loop using <li> tag

I found some issues with the search result template and search feature from Bricsk.

1.
I created a template where I used the search element and I only wanted it to display products in search result. Instead of taking me to search result page it takes me to the product that’s similar to that keyword.

This happens when I add this action URL

2. I used the query loop to design the search result page. I set a template for “Result not found” but a marker is disrupting the interface.


This the case when I use a template


This is the case when I use text for the “No Result” settings in the query loop

Let me know if my explanation ain’t clear enough.

In addition

I asked this long ago and couldn’t get an answer which contributes to this present issues — Search Term Not Found - How To - Bricks Community Forum (bricksbuilder.io) c

Hi @abey ,

  1. Please may I know what is the library link stands for? Can you please provide a link to your website and the term you are searching?

  2. Same thing, please provide URL to your website. The CSS should be coming from other plugins or custom code.

I will reply your question in that thread.

Regards,
Jenn

Hi,

  1. I have sent the link to your DM! You will see the library page.
    I searched for a term which has a product in existence and not in existence to see the search not found template.

Hi @abey ,

Thanks for the URL.

  1. It is a default behavior in WooCommerce when the search result only contains 1 product. (In Shop page or product archive pages) Please test this in a default WP theme.

You can try this snippet to deactivate the redirect.

add_filter( 'woocommerce_redirect_single_search_result', '__return_false' );
  1. I can replicate the issue when you are using <li> as the looping tag. Recorded in the bug tracker.
    Update: This isn’t a bug. you have to define list-style:none manually.

Regards,
Jenn

1 Like

Thanks!

I attempted to have the template shown when a search is done no product is found. But I couldn’t have such a condition done. I tried different codes but none work.

Do you have a remedy for this? So that a section/template will display when the search query has no result found.

PS: I created the search template with Query loop to display the searched items.

Hi @abey ,

Your current setup is correct.
As a temporary fix, you just need to add this custom CSS

.bricks-posts-nothing-found {
  list-style:none;
}

Regards,
Jenn

1 Like

I appreciate you a thousand times!

Another issue was found!

When I set a div to the li HTML tag, it adds the marker.

Hi @abey ,

After discussing with the team, actually this isn’t a bug (Updated my previous reply too)

You have to define list-style: none manually if decide to use <ul> <li>

It wouldn’t happen on a block element as block has a default display: flex style on it.

Regards,
Jenn

1 Like

OMG!

This is strange. Alright!
Thanks for your assistance.