404 page Search Engine doesn't work.

This topic has 10 replies, 4 voices, and was last updated 8 years, 3 months ago ago by Stan Russell

  • Avatar: Eric
    Eric
    Participant
    December 21, 2015 at 05:12

    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

    9 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 21, 2015 at 10:09

    Hello,

    I don’t see search icon on your site.
    Have you removed it?

    Best regards,
    Jack Richardson.

    Avatar: Eric
    Eric
    Participant
    December 21, 2015 at 10:27

    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

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 21, 2015 at 11:19

    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.

    Avatar: Eric
    Eric
    Participant
    December 21, 2015 at 17:48

    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

    Avatar: Eva
    Eva Kemp
    Support staff
    December 21, 2015 at 21:03

    Hello,

    Sorry, but there is no such possibility.

    Regards,
    Eva Kemp.

    Avatar: Eric
    Eric
    Participant
    December 29, 2015 at 06:54

    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

    Avatar: Eva
    Eva Kemp
    Support staff
    December 29, 2015 at 11:46

    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.

    Avatar: Eric
    Eric
    Participant
    December 30, 2015 at 10:35

    Dear Eva,

    Thanks, it works.

    Regards,
    Eric

    Avatar: stan
    Stan Russell
    Participant
    December 30, 2015 at 10:37

    Hello Eric,

    you are welcome!

    Regards,
    Stan Russell.

  • Viewing 10 results - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.