WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] creating search box (14 posts)

  1. bbhammer
    Member
    Posted 1 year ago #

    Hi

    I am trying to create a search box on a page (resembling the google landing page).

    Does anyone know how to do this?

    Thanks

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Are you looking for support with the appearance of it?

  3. bbhammer
    Member
    Posted 1 year ago #

    No, creating it. I am just trying to create a simple page with a search form on it.

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Have you reviewed this Codes resource http://codex.wordpress.org/Creating_a_Search_Page ?

  5. bbhammer
    Member
    Posted 1 year ago #

    Yes, i have reviewed that one.

    With that guide I successfully created a search page. However, nothing else was displayed but the search form. A totally blank page but the search form in the left hand corner. No theme, no nothing.

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    Can you link the webpage with this issue?

  7. bbhammer
    Member
    Posted 1 year ago #

    Sure. I just want to mention that this is not theme specific. I would like to use it on free themes as well as commercial themes.

    Landing page: http://www.sikkervaccination.dk

    Search box test (fail): http://www.sikkervaccination.dk/search

  8. Andrew
    Forum Moderator
    Posted 1 year ago #

    I don't know how your theme handles its templates, but on a general free theme you'd need to use get_header and get_footer functions.

  9. bbhammer
    Member
    Posted 1 year ago #

    Meaning that I should include those in the searchpage.php file?

  10. Andrew
    Forum Moderator
    Posted 1 year ago #

    Yes, or which ever functions your theme uses to bring relevant template files into your searchpage.

  11. bbhammer
    Member
    Posted 1 year ago #

    I see. Thank you so much for your help Andrew. Much appreciated!

  12. Phil
    Member
    Posted 1 year ago #

    Without a header and footer, no theme loads so be sure to add them. You can use a page template like page.php as a starting place and add your own code after.

  13. bbhammer
    Member
    Posted 1 year ago #

    It resolved the issue.

    Using the guide http://codex.wordpress.org/Creating_a_Search_Page together with adding header and footer made the trick. Some additional modifications had to be made to make it work with the theme I'm using.

    Thanks again for your help!

  14. Andrew
    Forum Moderator
    Posted 1 year ago #

    And Thanks to you and Phil for contributing to the WordPress community :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags