Forums

wordpress search page (4 posts)

  1. raincao
    Member
    Posted 2 years ago #

    hi there, I just read the Creating a Search Page http://codex.wordpress.org/Creating_a_Search_Page

    I don't understand the step Linking to Your Search Page
    What is Page ID number? And where should I put <a href="index.php?page_id=17" title="Search Page">Search Page</a> this kind of code?

    Does there anyone can help me to finger it out? Thanks.

  2. Alphonse Yu
    Member
    Posted 2 years ago #

    Page ID is the unique number that comes with the page, and can be found in the permalink of the page, after page_id=.

    You can put the code on a page, or a widget in the sidebar.

  3. raincao
    Member
    Posted 2 years ago #

    Thank you. The permalink is: http://raincao.com/search-results/

    I didn't see page_id= in the permalink. Where can I find the Page ID? Or can I just use the permalink like this:<a href="http://raincao.com/search-results/ " title="Search Page">Search Page</a>

    I put <?php get_search_form(); ?> in the sidebar.php, and the code in the searchform.php is like this:

    <form role="search" method="get" id="searchform" action="http://raincao.com/diaries/">
            <input class="searchbox" type="text" value="" name="s" id="s" size="15"/><br />
            <input class="searchbutton" type="submit" id="searchsubmit" value="Search" />
    </form>

    Where should I put the permalink code to? Sidebar.php or Searchform.php?

  4. raincao
    Member
    Posted 2 years ago #

    Is there anyone knows it?

Topic Closed

This topic has been closed to new replies.

About this Topic