Home Forums WoodMart support forum Search function

Search function

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #428605

    Pernilla
    Participant

    The search box that appears on the search result page does not search for pages. How can I make it work for pages and products in woocommerce?

    #428641

    Hello,

    Please make the full backup of your site and check the issue on the Storefront theme to detect if our theme causes the problem. Storefront is a free theme developed by WooСommerce.

    Best Regards

    #428720

    Pernilla
    Participant

    Thank you Elise. When changing the theme to a default wordpress theme the search function works. It shows results from pages.

    #428953

    Hello,

    Please insert the site admin access into the Private content below the message area. We will take a closer look at the case.

    Please, confirm the permission for plugins deactivation, and switching to the parent theme. As soon as we complete the testing we will enable all back, however, the site would be without plugins for 15-20 min. You would better make the full backup of your site.

    Best Regards

    #441871

    Pernilla
    Participant

    I am sorry that I could not reply to you sooner…. But now finally I can concentrate again on this problem.
    When coming to the default 404 page and make a search, the search function looks to only search for post. I would like it to search for all content (post, pages and products).
    I can not make it work.
    But when using wordpress default theme it works.
    I hope you can help.

    #441918

    Hello,

    I do not see search in the home page, please provide the page URL where I can catch the problem.

    Best Regards

    #441960

    Pernilla
    Participant

    I used this: https://chokladverkstan.se/xxx
    Then I write in example “choklad” in search field and you will come to a new page with no results.
    On both those pages it happens.

    #442212

    Hello,

    Please insert the site admin access into the Private content below the message area. We will take a closer look at the case.

    Best Regards

    #442394

    Pernilla
    Participant

    Here comes the login info to the developing site.

    #442436

    Hello,

    I do not search on the header.

    The search can find products, projects, posts. You can configure the search in the header builder: https://xtemos.com/docs-topic/how-to-add-and-edit-builder-elements/

    If you have any questions please feel free to contact us.

    Best Regards

    #442455

    Pernilla
    Participant

    Thank you Elise!
    Maybe I dont explain myself clearly. There are 2 reasons why visitors can end up on ” not found / 404 page”:
    1. If I use the search function in header it will search for all kind of posts, yes, but if visitor search for something that does not exist or if they do a wrong spelling, they will come to the “nothing found page”
    2. If they end up at 404 page for some reason

    Then, the user will use the search box on the 404 page, this search function will not show pages/products. Only posts. This is the problem. That search box is the problem as it only search for posts.

    #442727

    Hello,

    404 page and search results are different things. Please check the nature of 404 https://en.wikipedia.org/wiki/HTTP_404

    The search provides the result of the content; if nothing is found, you get the appropriate message.

    Best Regards

    #443731

    Pernilla
    Participant

    Hi Elise!
    If you make the search via woodmart search function in header it will search for “post_type=any”.
    If you for some reason come to 404-page search function it will search for “post_type=post”.
    In wordpress default theme the 404-page will search for “posts”.
    The search results with woodmart theme will be very confusing as it does not include all type of posts and my clients will loose information and eventually I will loose clients as they can not find the content.
    Must be someghing you should consider to correct?
    I enclose a printscreen.

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

    Hello,

    The search header has been customized a bit for finding posts/products, which is why it shows this slug.

    The search in 404 is the default WordPress search. That is why it differs.

    If you have any questions please feel free to contact us.

    Best Regards

    #444318

    Pernilla
    Participant

    “The search in 404 is the default WordPress search. That is why it differs. ” = but it does not sound right, the default wordpress search shows results for posts and pages. But not when using Woodmart. So Woodmart is not using wordpress default search on 404 pages then. Right?

    #444836

    Hello,

    Please add this code to the functions.php of the child theme:

    add_filter('woodmart_404_search_post_type', 'wd_404_search_post_type' );
    function wd_404_search_post_type( $post_type ) {
    	return 'any';
    }

    This code would make a search to find all post types.

    If you have any questions please feel free to contact us.

    Best Regards

    #445279

    Pernilla
    Participant

    Thank you very much. Now it works as expected.
    Thank you for the solution.

    #445579

    You are welcome! We are here to help.

    Wish you a wonderful day!

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

The topic ‘Search function’ is closed to new replies.