Home › Forums › WoodMart support forum › Search function
Search function
- This topic has 17 replies, 2 voices, and was last updated 1 year, 9 months ago by Elise Noromit.
-
AuthorPosts
-
December 13, 2022 at 10:29 pm #428605
PernillaParticipantThe 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?
December 14, 2022 at 4:37 am #428641
Elise NoromitMemberHello,
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
December 14, 2022 at 12:09 pm #428720
PernillaParticipantThank you Elise. When changing the theme to a default wordpress theme the search function works. It shows results from pages.
December 15, 2022 at 5:24 am #428953
Elise NoromitMemberHello,
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
February 10, 2023 at 12:18 am #441871
PernillaParticipantI 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.February 10, 2023 at 6:24 am #441918
Elise NoromitMemberHello,
I do not see search in the home page, please provide the page URL where I can catch the problem.
Best Regards
February 10, 2023 at 10:10 am #441960
PernillaParticipantI 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.February 11, 2023 at 4:19 am #442212
Elise NoromitMemberHello,
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
February 12, 2023 at 10:19 pm #442394
PernillaParticipantHere comes the login info to the developing site.
February 13, 2023 at 8:33 am #442436
Elise NoromitMemberHello,
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
February 13, 2023 at 10:02 am #442455
PernillaParticipantThank 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 reasonThen, 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.
February 14, 2023 at 5:14 am #442727
Elise NoromitMemberHello,
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
February 16, 2023 at 11:50 pm #443731
PernillaParticipantHi 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.February 18, 2023 at 6:48 am #444170
Elise NoromitMemberHello,
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
February 18, 2023 at 9:01 pm #444318
PernillaParticipant“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?
February 21, 2023 at 2:45 am #444836
Elise NoromitMemberHello,
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
February 22, 2023 at 9:58 am #445279
PernillaParticipantThank you very much. Now it works as expected.
Thank you for the solution.February 23, 2023 at 5:49 am #445579
Elise NoromitMemberYou are welcome! We are here to help.
Wish you a wonderful day!
-
AuthorPosts
The topic ‘Search function’ is closed to new replies.
- You must be logged in to create new topics. Login / Register