Is there any way to remove search bar from the 404 page?

This topic has 5 replies, 2 voices, and was last updated 2 years, 1 months ago ago by Sadikul Islam

  • Avatar: Sadikul Islam
    Sadikul Islam
    Participant
    November 10, 2022 at 18:04

    If I search in that search bar it shows all the posts, products, and pages, that I don’t want, I just want to show the products and posts. how do I remove it or have only to search the products and posts?

    Please, contact administrator
    for this information.
    4 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 11, 2022 at 03:15

    Hello,

    Header Builder > Search settings > https://prnt.sc/na2HD76TPIoL
    To remove this https://media.d.pr/i/4SyjEz , add the next code in Theme Options > Theme custom CSS > Global:

    .page-404 .widget_search {
        display: none;
    }

    Regards

    Avatar: Sadikul Islam
    Sadikul Islam
    Participant
    November 11, 2022 at 13:57

    Hi, it is set to show posts and products only in the settings, but still shows pages there. see the screenshots in the private content area.

    There you can see it is showing the homepage.

    Here is the website URL: https://www.reviewcellular.com/

    You can throw any URL which will show a 404 page then you can try searching from that search bar below the 404 heading: https://prnt.sc/Nw-hrIkaMH1b

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 11, 2022 at 15:44

    Hello,

    Thanks for the explanation. The search in content of 404 page is the default WordPress widget, which is not affected by settings from Theme Options.
    The functionality of this search can be changed via additional customization in files. Additional customization is outside the scope of our basic support. You can try it by yourself if you have PHP skills, for example, read this article – https://thomasgriffin.com/how-to-include-custom-post-types-in-wordpress-search-results/ , or hire a developer for this.

    Regards

    Avatar: Sadikul Islam
    Sadikul Islam
    Participant
    November 11, 2022 at 15:45

    Nahh, I’ll just hide it then, thanks for clarifying

    Have a nice day.

    BTW, that’s a great resource, I’ll use it elsewhere.

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

The issue related to '‘Is there any way to remove search bar from the 404 page?’' has been successfully resolved, and the topic is now closed for further responses

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