Without more explanation no one can really help you very much. There is nothing natively in WordPress that includes State or Company Name. Where is the information coming from that you want to be searchable?
Basically, I want to provide two different types of search functionalities to the website. I have an external dataset that is uploaded to a SQL database and I want to make it searchable. Upon search, the results should be displayed in a formated table on the WordPress website.
So, here are the two search functionalities I am trying to add:
1. I want to have a drop down menu similar to the one on the screenshot here: http://www.vatodorov.com/upload/Misc/Dropdown%20example.JPG
My database already has a field called State, but I don’t know how to put this drop-down on the website
2. I also want to provide a separate search that will let visitors search through names in my database. Again, the results of the search should appear formatted on the website.
I spent a lot of time in the WordPress forums yesterday and it seems like this can be achieved using the plugin WP-EXEC with some PHP and SQL coding.
Let me know if you have any other ideas.
Thanks
Hi
What you want to do can be done.
I suggest a different approach than using wp-exec. (I just looked at wp-exec website, and that plugin was created for WordPress 1.5, which means it hasn’t been updated in about 5 years).
The content you want to display exists entirely outside of WordPress. I suggest you use a custom page template – see
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
In this case you would not use WordPress posts or pages or custom post types. On the custom page template you would write (or have written if you don’t have the knowhow to do it yourself) PHP code to extract the info from the database and display it on a page.
For pages like that you would be using WordPress only as a container within which to display the results – they custom page would appear in the site Nav, The page of results would use the site’s theme to display so it looks like the rest of the site.
But the code to display from the database would not use the WordPress loop. It would be PHP / MySQL data retrieval and display code.
I really doubt you will find a plugin that lets you display results from an external database, formatted the way you want them to appear. The reason is every external database is different, has different tables and table structures. And no two sites will want the external data visually displayed in the same way. So there is little generalization to encapsulate in a plugin as everyone wants it different.
I’ve created pages on some sites along the lines of what you want to do thus I know it can be done. But it requires writing custom code.
Thank you for the thorough explanation. It helps a lot!
I have some knowledge of working with WordPress, but don’t know PHP. A friend of mine will help me with that.