• rocke

    (@shashibhushan)


    Hi,

    First of all my this post is related to : Link

    I made my custom taxonomy page : My Custom Taxonomy Page link is : https://localhost/myproject/?motion=aamir-khan . this page is custom taxonomy page ( note : no custom page , only custom taxonomy )

    but now there is new requirement Of Custom Search page in which only my custom taxonomy data will be search : like if any one search aamir khan ,salman khan — then after submit on my custom search button the same page should be seen as of my custom taxonomy .. not default wordpress search page

    Hence i add below custom search form at my header :

    <form role="customsearch" method="get" id="customsearchform" action="<?php echo home_url('/'); ?>">
    <div>
    <label for="s">Search for:</label>
    <input type="text" value="" name="motion" id="motion" />
    <input type="submit" id="customsearchsubmit" value="Search Motion" />
    </div>
    </form>


    I have place above custom search button at my header.php

    Hence if any one search with aamir khan then the custom taxonomy page should be seen but i am getting ” Page not found “

    Why page not found : because after search with my custom search form the link generated is : https://localhost/myproject/?motion=aamir+khan

    where as my custom taxonomy page link generated is : https://localhost/myproject/?motion=aamir-khan

    same when any one search for salman khan or any other data:

    https://localhost/myproject/?motion=salman+khan

    but my actually custom taxonomy link generated is :

    https://localhost/myproject/?motion=salman-khan

    In short i want custom search only for my custom taxonomy data page :

    Note my default search should not be effected , as i want that to in my website . hence one wordpress default search button , and another my custom search button which only for my custom taxonomy page .

  • The topic ‘Custom Search only for my Custom Taxonomy Page data’ is closed to new replies.