This topic has 10 replies, 4 voices, and was last updated 8 years, 3 months ago ago by Stan Russell
Dear Service,
I found 404 page search engine doesn’t work?
1). I’ve set theme options > header > search post type as product, but no matter I input product key words or page key words it doesn’t work.
2). If I want to remove the search engine from 404 page, how to do that?
Best regards,
Eric
Hello,
I don’t see search icon on your site.
Have you removed it?
Best regards,
Jack Richardson.
Dear Jack,
Yes, I didn’t set search box in my website.
But in 404 page, there is a search box by default.
I try the search box from 404 page.
Look here…
http://store.yoz.tw/rockpal-%E6%9C%83%E5%93%A1%E6%9C%8D%E5%8B%99%E8%88%87%E9%9A%B1%E7%A7%81%E6%AC%8A%E6%94%BF%E7%AD%96/
Regards,
Eric
Hello,
To remove search form on 404 page you need edit the file 404.php in wp-content/themes/woopress directory and comment the code <?php get_search_form( true ); ?>
in line 15.
Best regards,
Jack Richardson.
Dear Jack,
I’ll try it, thank you.
What if I want 404 page search box could work to search products “or” page contents?
Is that possible to add search box with “Product” and “Page” as drop box value to be selected?
Regards,
Eric
Hello,
Sorry, but there is no such possibility.
Regards,
Eva Kemp.
Hi, Eva,
Back to the 404 page search problem, Why it always search by “post”? I want that 404 page search box could work as “product” search just like I set at『options > header > search post type as product』.
How to do that?
Regards,
Eric
Hello,
Please try to edit the file wp-content/themes/woopress/searchform.php and replace the line 13 <input type="hidden" name="post_type" value="post" />
with this code <input type="hidden" name="post_type" value="<?php esc_attr_e( etheme_get_option('search_post_type') ); ?>" />
Regards,
Eva Kemp.
Dear Eva,
Thanks, it works.
Regards,
Eric
Hello Eric,
you are welcome!
Regards,
Stan Russell.
You must be logged in to reply to this topic.Log in/Sign up