Per following your instruction I built a WordPress Archive to show the search results (you can see it here : hidden link)
I have ran into 2 issues though :
1 - On top of the page there are many search fields that were created automatically and I don't know how to take them off. (see image attached)
2 - It is a masonry style in 3 columns. I wanted to show up like this : hidden link (scroll a little down to see the posts). But although I completely copied the view into the wordpress archive, it doesn't work. All posts are displayed in only one column that is a 3rd of the page width?! (see image attached)
Can you please help me solve these 2 issues please.
Thank you in advance
Hi,
Thank you for contacting us and I'd be happy to assist.
To guide you around these points, I'll need to see how this archive is set up in the admin area.
Can you please share temporary admin login details, in reply to this message?
Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.
regards,
Waqar
Thank you for sharing the admin access.
I've performed some tests on my website with a similar search archive set up, but, couldn't reproduce this behavior. This suggests that something specific to your website is involved.
To troubleshoot this, I'll suggest the following steps:
1. Please make sure that WordPress, active theme, and plugins are all updated to the latest versions.
2. It would be interesting to test this with all non-Toolset plugins disabled and a default theme like Twenty Twenty-One.
If it's fixed, you can start adding the disabled items, one by one, to narrow down to a possible conflicting one.
3. In case the issue still persists, I'll need your permission to download a clone/snapshot of your website, to investigate this on a different server, without affecting the actual website.
I hope this helps and let me know how it goes.
Hello,
1. Updated all plugins.
I did some tests with different search words.
"test": I have the 3 columns, the third filled and other with blank elements?!
No filter bug on top.
"hauteur": one articles displays perfectly as it should, but column two is bugged with blank elements, bugged filters and weird articles
"article": one column, bugged.
"doute": displays perfectly.
2. Tried and not fixed.
3. I did a copy of the website in this test environment aprioris.camila.in
you have the same login to access it.
You can use it as it pleases for test or clone in your own server to test it. It is the one I used for testing point 2.
Thank you
Any news regarding my issue?
Thank you for the update and the permission.
I've downloaded your website's clone, and currently performing some tests on it, on my server.
Will share the findings, as soon as this testing completes.
Thank you for your patience.
Thank you Waqar, please let me know as soon as you can. We are now waiting just this point to get the website online
Thank you for waiting.
During troubleshooting, I noticed that the layout of the search page was getting broken because the pages with views and conditional blocks were also being shown in the search results.
To avoid this, you can limit the search results to only selected post types, excluding the "pages". For example:
function custom_filter_search_post_types($query) {
if (!$query->is_admin && $query->is_search) {
$query->set('post_type', array('post', 'podcast', 'entretien-politique', 'itineraire-bis', 'hauteur-de-vue', 'point-de-bascule'));
}
return $query;
}
add_filter('pre_get_posts', 'custom_filter_search_post_types');
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.
After that, only the post types whose slugs have been included in the code snippet will be shown in the search results and you won't have the same layout issue.
My issue is resolved now. Thank you!