WordPress Widget And Shortcode

WordPress Widget And Shortcode
I need a sidebar widget that will offer some simple search criteria with a find button. The results will appear on a give post or page using a shortcode.

The database setup, test data and search queries already exist.

Widget – The widget will have three drop downs- product category, country and location. (all read from the database). It needs to dynamically change the location list based on the country picked without a page refresh.

The widget setup should show have a title and a link to the search page/post permalink.

Once the search button is pressed it should pass the parameters to the page/post specified.

The Shortcode
The search page will contain a shortcode [PRODUCTSEARCH] which will generate the following results.

If no parameters are passed to the page then it should display the same search boxes as the side bar widget and work in the same way.

If parameters are passed the shortcode should display details that match the search from the database view. The given fields should be formatted in its own <p> tag. I will sort out the formatting properly later.

I will produce a database script to create the tables and test data. As well as the main queries you will need.

The plugin does not need to create the tables when it is installed. I can also supply a simple php database admin program to edit the test data if you wish.

Nice and easy to create.

Leave a Reply

Your email address will not be published. Required fields are marked *