Support » Fixing WordPress » Change the default action attribute in my search form?

  • the current search form:
    <form method=”get” id=”searchform” action=”<?php echo esc_url( home_url( ‘/’ ) ); ?>”>

    is there possible to change action attribute from default page to other assigned page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • yes possible.

    if you have page called search.php then you can use this in action.

    Better to have/create a page in dashboard by same name(Search) and in action you just put “search”

    Thanks, Zakir,

    search.php is control result format. In my website, wordpress default search result format is OK. What I truly want is display search results in the same page if I put a search form in a page. I don’t want search results show up in the front page, where the wordpress defualt sets. In this circumstance, if users want to make search again, they need find the original page. (My search is category specified search, not wordpress default search.)

    Could you give me more detail suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change the default action attribute in my search form?’ is closed to new replies.