• victordandy

    (@victordandy)


    Hi,

    I have added an additional table to wordpress tables. This table is ‘rates’ and stores rates of different products that I sell. The rate of each product is dependent on the date of buying. It varies according to the date. Product names and description are stored in the posts and custom fields.

    I want to give my site visitors functionality of searching a product’s rate on a particular date. Now, I figured that the best option would be if I could modify existing wordpress search form to include date range and qty of product fields. I have been able to get the output by running the query for a fixed date range within search.php using the standard search form. But I want to add the aforementioned fields so that visitors could choose a date to search it.

    Apparently, it would require to get_search_var somehow and modify the get_search_query. But I am unable to find where exactly wordpress captures the search form variable and where exactly is the SQL query for searching the variable written. If I could find that I guess I can solve my problem. Can someone please help. There is no info on Codex about this. I searched at many places and all there is about Search forms is either CSS modifications or retrieving other info from wp tables. What about non-wp tables

    Please help.
    Regards

  • The topic ‘Modifying search form and querying non-wordpress additional tables’ is closed to new replies.