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 have been searching throughout the web for the best way to implement what I need but just cannot find a best solution as there always seems to be some drawback. I'd prefer to do it right the first time and it's been weeks trying to find the best solution.

On my current website, I need to add listings of businesses with their various information such as address, phones, URLs referring to the business, etc. There would be 30+ fields and as you can see with the example of the URLs there can be many URLs which refer to the business.

I'll need another list with its own data which will be a many to many relationship to the businesses.

I know SQL and could easily do this in C# ASP.NET but am trying to find the best way to do it with WordPress. I will be using the Genesis framework if that matters. It appears I have 3 solutions:

  • create custom tables in the WP database
  • use Custom Post Types with many custom fields
  • rely on a plugin

Custom tables: It seems easy to retrieve the custom table info via SQL code but it looks like I would have to create an admin and especially if I want it to appear in the admin dashboard for ease of use to modify the tables.

Custom Post Types: They seem like they might work but then I'd need a way to do the many to many relationship and the solution there seems to rely on a plugin like Posts 2 Posts. Also I'm not quite sure how easily it is all managed since it seems like there would be many WP pages to navigate instead of having perhaps one UI.

Plugin: I have seen some recommended but then you're at the mercy of hoping the author maintains the plugin and then what happens if it breaks hence killing your website.

So to the more experienced WordPress users out there, if you were going to tackle this project, which method would you use? Thanks!

share|improve this question
    
Do you have any example website which has similar functionality to the project you mentioned above? I understood most of your question but I'll need another list with its own data which will be a many to many relationship to the businesses. –  Kuldeep Daftary Dec 28 '12 at 16:14
    
Fourth option- use custom types and metadata but create your own ui to manage. Posts to posts is developed by a major core contributor, so its future is likely safe, but you can always look at souurce to see how its implemented, i don't think its especially complicated. –  Milo Dec 28 '12 at 16:27
    
@KuldeepDaftary, Another list which has details and also includes a list of those businesses. For example gotexanwine.org/texaswinetrails Each wine trail has details and then there are a number of wineries on each wine trail. A winery can also be on more than one wine trail. –  dcwebman Dec 29 '12 at 0:26
    
@Milo, thanks for your suggestion. –  dcwebman Dec 29 '12 at 0:28

2 Answers 2

Generally, creating your own tables is discouraged. Back in the day, it was common to see plugins create tables. In a lot of ways, plugin authors didn't have much choice, but it did make a mess especially because it was common for plugins not to clean up after themselves. I get that, and agree that publicly released themes and plugins should not create tables if it can be avoided.

Having said that, I would lean towards creating the tables. I've done something much like what you describe and maintaining and improving that subsystem is still a big part of my job. I have considered post types but can't convince myself that they would really work for the business listings, though I am using them for a 'business bio' component. The relationships I need, the searches, the performance... I just don't think it would work if I hadn't built my own tables.

Yes, you have to build your own interface but the "post"-like interface makes no sense for the data anyway, at least not for mine.

share|improve this answer
    
Thanks for your input. After your first paragraph I thought for sure you were going to suggest CPT. :) –  dcwebman Dec 29 '12 at 0:33
1  
Nope. Not for this. I love CPTs. They make a lot things easier than they used to be, but I don't think they are a fit for everything. –  s_ha_dum Dec 29 '12 at 4:41

Use PODS plug and its extended posts functions. I tried everything and this is the best! Also, you can use Pods for your own tables in wp database and use them as objects. Go to Google and just type: wordpress pods. After adding your content fields, just use them as post meta fields.

share|improve this answer
    
Thanks, I'll take a look at PODS –  dcwebman Dec 29 '12 at 0:29

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.