Support » Fixing WordPress » Custom Post Type or custom db table

  • I’m building a membership plugin for an existing wordpress site and I’m undecided as to whether I use custom post type (cpt) or a custom db table.

    The online membership form will have many fields and the site WILL NOT have membership exclusive pages but the company will manage the members via WP admin and will have the facility to create new members via the backend.

    If I use cpt I won’t be using the title and content fields so the entry in the wp_posts table will be blank for the title and content fields however the rest of the info submitted via the form will be stored as post meta data. This will mean several records per member as opposed to one record if I use a custom db table.

    Which route should I take? I’ve researched the subject but am still at a loss.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I don’t really understand what you need the post type or db for?
    This is absolutely not necessary for a membership function as far as i can tell. Users can be added using the Users page in the backend, right?

    There’s a whole bunch of other data that I need to associate with the member, expirey dates, payment reference, 2 different addresses and a variety of form checkbox answers. So thought the best route might be a custom db table.

    I have built a very big website with lots of post meta fields on over 4000 posts. I used also a custom post type. This works pretty well and was quick & easy to implement with WordPress functions.

    However, at one point i had to build a custom DB table on top of all this because cross searching in the custom post type and categories of normal posts using the WordPress functions just was not fast enough.

    I think that building a custom table will require lots of extra coding. You should ask yourself if this is really necessary for your project.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Post Type or custom db table’ is closed to new replies.