Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am an intemediate website builder and have been working with wordpress for a few years. I am attempting to build a website (for myself) that is data intensive. All I've built to date are sites that have 20-30 categories, and several pages. The new site is a business directory that will cover 50 U.S. States and have 20-30 Business Types.

My problem is that I have never really worked with post types or taxonomies, and so I cannot wrap my small brain around how to structure this site so that the content is easy to search for users. For example, a user should be able to search for a motorcycle dealer in Florida. My plan is to cover cities and zip codes via tags (unless someone suggests a better way!). Most of the default wordpress search functionality is pretty weak as well. For instance you cannot sort results via something like a dropdown menu (as far as I've seen anyway).

I was thinking to structure the website like this:
Post Type - California
Taxonomies - Bar, Cafe, Auto Dealer, Salon, etc...
Post Type - New York
Taxonomies - Bar, Cafe, Auto Dealer, Salon, etc...

So, any help determining the best way to put together this type of site in a fashion that doesn't bury the data and is usable as a directory would be really appreciated. It will be a photo intensive site, so although I know there's a nice directory plugin out there - it just wouldn't work! Each business location needs to be it's own post.

In addition to structuring the directory, any ideas for the best way to implement advanced search functionality would also be greatly appreciated. Looking at the Relevanssi Pro Plugin at this point for search.

Thanks for reading. Also, let it be known that I am not opposed to paying a pro for their time helping me with this information, or setting this up on the back end.

-----------------FURTHER QUESTIONS:
Thanks a lot. This is the most comprehensive advice I've gotten anywhere.

To be sure I understand correctly:

Step 1:
Create a post type: companies
Step 2:
Create 2 Taxonomies:
location
business_type

Step 3:
Create Taxonomy Terms for each of the above taxonomies:
Taxonomy: location
Terms: NY, CA, KY, TX, GA, etc...

Taxonomy: business_type
Terms: salon, auto_dealer, restaurant, etc...

Step 4:
Add custom fields to companies post type with custom meta boxes:
city
zip code
phone number

That all seems pretty clear and leaves me with a few more questions:

Is Relevanessi the best method you know of to implement searches for this type of data? http://wordpress.org/extend/plugins/relevanssi/

Do categories/subcategories become completely irrelevant when implementing the above procedures? (my guess is yes they do, as this seems much more powerful)

Lastly, I haven't read enough yet, but I assume the way to create menu items is to use taxonomies and taxonomy terms. Is that correct?

Thanks so much for introducing me to this different level of wordpress usage. Never had the need before, so I just never learned it.

share|improve this question
1  
You are not actually asking a specific question, you are more looking for an advice. In addition your question is more about site design then about coding or WP. My 2 cents is that you need to consult site designers and not programers at this stage. –  Mark Kaplun Feb 5 '13 at 7:46
    
Thanks Mark. Sorry about that - didn't see categories in this forum, userabuser below provided me with some very strong information already! –  AnthonyNYC Feb 5 '13 at 18:33
    
Categories/Subcategories? What about them? If you want your taxonomy to be hierarchical you can have it as such (parent/child/etc) or if you want your taxonomy to be non-hierarchical then they will behave as tags do. The structure is up to you. As for Relevanssi, never used it. You're mixing multiple questions here that should be separated into individual questions. You should tackle each question separately as trying to cover all of this in one swoop is only going to confuse you more than anything else. I recommend first setting up your post types/taxonomies/metaboxes/custom fields. –  userabuser Feb 6 '13 at 4:29
add comment

1 Answer

up vote 1 down vote accepted

First, what you don't want to do is create a post type per state, in fact you want your states to be associated with a taxonomy (one taxonomy called locations with each state being a term that belongs to that taxonomy).

Therefore...

In this scenario I would create a post type named dealer or companies (if the type of businesses in your directory are non-specific as your tags suggest then name your post type something similar to companies so it makes sense as to what the post type is).

I would then create two taxonomies named location (for state based locations) and company type.

Then you using your companies post type you can create new companies and assign taxonomy terms for both their location and type.

I would then attach custom fields to the companies post type (using a custom meta box) for other meta data that applies to the specific company being create such as street address, zipcode, phone number, website url or any other pertinent details you think are relevant to your needs.

You can then use custom taxonomy and post meta queries (via the use of WP_Query) to search through your company post type and all of the associated data (taxonomy terms/custom fields).

The links you need to read up on are as follows:

share|improve this answer
    
Thanks so much for this advice. Could you take a look at the added questions/clarification above if you have a moment. I think I have a handle on the info you gave me. Just want to be certain. Thanks again! –  AnthonyNYC Feb 5 '13 at 18:32
    
So far you understand correctly, yes. I recommend focusing on this first before you try to work on menus or search related plugins as this step will keep you busy enough. Once you have this all setup, I recommend starting a new question that tackles the next problem you are faced with, explaining your existing setup. –  userabuser Feb 6 '13 at 4:31
    
Thanks again. I will get this all set up and go from there as you suggest. Once I create the framework and add 30-40 entries, then I'll have something to work with. I may have found an easier way to add the post types/taxonomies/metaboxes/custom fields. This is an interesting plugin that actually generates the code which can then be used without any plugin at all: codecanyon.net/item/easy-custom-content-types-for-wordpress/… -- watch the video if you're curious about it. For the price, I may give it a shot because it looks like a decent tool. –  AnthonyNYC Feb 6 '13 at 7:25
    
I'm familiar with that plugin, its authored by Pippin, though I do not use it. It's more suited for those people who have no development experience or do not wish to declare such things manually. I prefer the latter as its less taxing on the database than having to store and retrieve your configurations from the database. To each their own. You might find it easier to use this plugin. –  userabuser Feb 6 '13 at 7:51
    
Thanks for your opinion, will try manually and use the crutch if I have too much trouble. My wife watches me studying this stuff and doesn't get how I find it fun. It's fun once you learn some new tricks! Will be back with a new thread after I sort this out! –  AnthonyNYC Feb 6 '13 at 16:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.