Skip Navigation

[Resolved] Code Snippet not working for custom search

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user's view results isn't showing up even though there are results.
Solution:

For some reason the user's view is being set to hidden.

Using the css below resolved the issue.


.js-wpv-view-layout{
visibility: visible !important;
}
This support ticket is created 4 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 12 replies, has 2 voices.

Last updated by FelipeP5703 4 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1289783
#1289851

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Felipe,

Could you send me a link to the page so that I can have a look at the page?

Thanks,
Shane

#1289869

It's the home page, so hidden link

I had turned off so I could work on other things, but I turned it back on so you can see the issue. You can check it out now.

#1289977

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Felipe,

I did another check on this for you and what seems to be happening is that your results visibility settings is set to hidden.

I suggest adding this css to your view.

.js-wpv-view-layout{
visibility: visible !important;
}

Please let me know if this helps.
Thanks,
Shane

#1290033
Pagination_mobile.jpg

Shane,

I don't understand why the results visibility settings is set to hidden. Could I just turn it on in the View settings?

Anyways, your code worked by the way.

1) But, in mobile, the pagination is still showing. See image.
2) When I click Reset (Resetar) it is showing me all results again, both on computer and mobile. Shouldn't the first code be reloaded to not show all the results?

#1290045
Pagination_mobile2.jpg

Also there is something weird going on with pagination on mobile. See image. There are two pagination and one is not even working.

#1290561

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Felipe,

This one might be a little difficult to solve but lets see.

Would you mind allowing me to have admin access to the site? I might be able to get the pagination to stop appearing.

Thanks,
Shane

#1292117

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Felipe,

I took a look at this for you.

Could you let me know if the issue still remains ?

Thanks,
Shane

#1292163
Pagination_mobile5.jpg
Pagination_mobile4.jpg
Pagination_mobile3.jpg

Yes it still remains. If you go on your phone, you will see the pagination with no items found. I attached some images so you can understand better. This is only happening on mobile.

But, again, when I click reset, all the listings show. Shouldn't it be just show no items found?

#1294203

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Felipe,

This should be fixed now.

It had to do where you added the pagination for the mobile view. It shouldve been added inside the [wpv-items-found] shortcode.

Thanks,
Shane

#1294223

Oh really? wow little things like that can make a difference! Thank you Shane.

But my question about the Reset button is still unanswered. Shouldn't it not show all the Listing after clicked?

#1295035

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Felipe,

No not in this case, because the code is meant to just remove the results for the initial load.

When the reset button is pressed it is essentially resetting the meta query for the posts.

Thanks,
Shane

#1295055

I guess I can just rename the Reset button to "Show All." My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.