Home Forums WoodMart support forum Search results bug

Search results bug

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #696614

    vynil
    Participant

    Hi team, in the header settings > Search, I have selected to show results from All post types. If I type something in my search form and click on View all results, instead of a normal search results page it opens my blog layout. Blog layout conditions are correct. Any ideas? Thanks in advance.

    #696669

    Hello,

    Sorry to hear about the inconvenience. Kindly, please share your Site WP-ADMIN Login details in the Private Content field so that we can check this concern on your Site and help you out accordingly.

    Best Regards,

    #696803

    vynil
    Participant

    Sure, please find attached in the private area.

    #696894

    Hello,

    I’ve checked your site, and the issue isn’t with the search itself. Your search results page is working correctly and returning the proper search results. The reason you see the “Blog” title is because your custom Blog Archive layout is being applied to the search results page as well.

    Inside your Blog layout, you have added a custom heading with the title “Blog,” so that same heading appears on the search results page.

    If you disable the custom layout then you will see the exact search result page.

    Best Regards,

    #696935

    vynil
    Participant

    Hello, thanks for giving it a look. I am a bit confused, because my layout is specifically for the Blog archive. Attached is a screenshot of my settings. What is the reason the same look is used for the search results as well? Obviously we can’t stop using the blog layout (if we didn’t need it, we wouldn’t have used it in the first place). So what can be the solution? Thank you in advance!

    Attachments:
    You must be logged in to view attached files.
    #697028

    Hello,

    When you set the search form to “All post types,” the search results page includes results from the Blog posts post type as well. Because of that, WordPress treats the search results page as a post-type archive for “post,” and WoodMart automatically applies your Blog Archive layout to it.

    That’s why your Blog layout is showing on the search results page.

    When you created a new layout specifically for the Search Results and set the search post type to the “Blog”, it worked correctly because it always applied the most specific condition first.

    Edit the search widget and choose the post type as blog and create a new layout only for blog posts then the new search result page layout will work. This is the way it works.

    For your reference, I have made a new layout (Blog layout for search results) and set it in draft on your site in the layout section.

    Best Regards,

    #697079

    vynil
    Participant

    Hello! Thank you. But “all post types” means I’d like for other results such as pages and portfolio items to appear in the search. In that case it won’t work for me to create a separate layout for blog, because I need results not only from the blog. Can I create a separate layout for search results or what is the best way to proceed?

    #697105

    Hello,

    When the search widget is set to “All post types,” WordPress automatically treats the search results page as a blog archive because the “post” post type is part of the results. That is why the Blog Archive layout always overrides your custom Search Results layout — this is default WordPress behavior.

    At the moment, WoodMart applies layouts in this priority: Specific post-type archive > Blog archive > Search layout, So if “post” is included in the search query, the Blog layout takes priority.

    If you want to display results from pages + portfolio + posts, but still use your own Search Results layout, you need to :

    Create a custom layout for Blog Archive that looks the same as your Search Results layout.

    This way, even when the Blog Archive layout takes priority, it will display exactly what you want.

    Best Regards,

    #697114

    vynil
    Participant

    Thanks for the explanation! I see what you mean. So basically the only solution is to create a design that will work for both blog posts and search results, as it’s not possible to have a different page style?
    As an alternative, is it possible to hide the “Show more results” option from the bottom of the search results?

    #697204

    Hello,

    Try to add the following custom css code in Theme Settings > Custom CSS:

    .search-results .wd-pagination{
    display: none;
    }

    Best Regards,

    #697497

    vynil
    Participant

    Thank you, I checked but sadly this doesn’t work. I even tried adding “important”. Can you please recheck?

    #697584

    Hello,

    I have added the Custom CSS on your site and it is working fine.

    See Screenshot for clarification: https://postimg.cc/LY3CDBJB

    Check back your site and check the issue after completely clearing the cache.

    Best Regards,

    #697747

    vynil
    Participant

    Hello, thanks for getting back. Looks like there has been some confusion, I was referring to this option:

    Attachments:
    You must be logged in to view attached files.
    #697901

    Hello,

    Try to add the following custom css code in Theme Settings > Custom CSS:

    .wd-dropdown-results .wd-all-results {
        display: none;
    }

    Best Regards,

Viewing 14 posts - 1 through 14 (of 14 total)