Tuesday, August 23, 2022
HomeWordPress Developmenturl rewriting - Web page not discovered: Customized search kind with a...

url rewriting – Web page not discovered: Customized search kind with a customized search web page


Let me present you an instance of what I am making an attempt to attain. On BBC web site whenever you click on the search BBC button on the navbar it brings you to a search web page (https://www.bbc.co.uk/search). While you put one thing within the search subject (say apple) and hit enter the URL turns into (https://www.bbc.co.uk/search?q=apple&web page=1) and that is precisely what I am making an attempt to attain ( &web page=1 is just not required). So what I did is –

#1 first created a brand new web page utilizing pages -> add new choice and titled it search and adjusted the default template to the search template search.php

2# I even have searchform.php serving as my customized search kind template. Right here is the code:

<kind function="search" technique="get" motion="/search" id="search-form">
    <div class="search-field-wrapper">
        <label for="search-field" class="visually-hidden"><?php _ex( 'Seek for:', 'label' );?></label>
        <enter class="form-control" kind="search" title="s" id="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder' ) ;?>" worth="<?php echo get_search_query() ;?>">
        <span class="search-icon-wrapper"><i class="feather search-icon" data-feather="search"></i></span>
    </div>
</kind>

Once I’m trying to find one thing the URL turns into http://localhost/search/?s=hi there and getting 404 not discovered. So, how can I get it to work just like the website I discussed?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments