WordPress.org

Ready to get started?Download WordPress

Forums

WordPress as CMS for custom data (7 posts)

  1. rubhadubh
    Member
    Posted 3 years ago #

    I have built a cms codebase over the years that allows clients to administer areas of their sites. I'm slowly moving to wordpress for many sites, but one topic which is stopping me is how to customize the backend to add management of custom data.

    Say I have a client who makes wood stoves. They maintain a list of dealers and installers, and want to save details about these companies, and then display them in some fashion on a site page. I can build a secure login section with the forms and functions to allow them to do so.

    My question is whether I can integrate this into the wordpress admin system, or whether I have to give them a separate admin url? If it's possible to integrate, could someone outline the approach to take - I can work out the details, but need to know where to start.

  2. jmkprime
    Member
    Posted 3 years ago #

    That sounds something like a Custom Post Type (http://codex.wordpress.org/Post_Types). The API allows you to define a new type of post/page of your own description and WordPress handles all standard UI and everything.

    You could have a "company" post type and set-up default Custom Fields to contain standard information. You are also able to set up custom taxonomies around them. Best of all it all appears under the Dashboard just like the post and page areas.

    It sounds a lot of work, but the backend handles pretty much everything.

  3. Mike Schinkel
    Member
    Posted 3 years ago #

    Hi @rubhadubh -

    @jmkprime is exactly right; Custom Post Types are your answer. There are probably 50+ tutorials on the web, just google for them. My company has been building CMS for vertical markets for the past year and they are the way to go.

    You could create a "Partner" post type and then a "Partner Type" taxonomy with values "Dealers" and "Installers", or you could create two post types: "Dealer" and "Installer." It's easy enough to try both just to play around with it and see which works better for you.

  4. rubhadubh
    Member
    Posted 3 years ago #

    Thanks guys, that's the kind of pointer I needed. I have come across post types, but wondered if that was the way folks were handling this sort of scenario.

    I have a lot of code written to handle members, companies, shop items - that sort of thing - add, edit, delete, re-order items and so on. I wasn't sure how to integrate any of that code, or whether to abandon it and try using inbuilt features.

    I'll have a play with custom post types, but is there a way to add a wp-admin menu item which would open an application page in the right pane, much like 'Settings'? The app code would have to be outside the core so as not to be written over on wordpress upgrade, but is that possible?

  5. Mike Schinkel
    Member
    Posted 3 years ago #

    You definitely want to abandon add/edit/delete/reorder code and use what is in WordPress.

    Yes, you can iframe something in the admin console. But if at all possible I'd try to minimize that because doing so typically means you are doing something you could do in WordPress, but in a less optimal way.

    Also, when you get to hardcore WordPress how-to questions, you might also want to post your questions over on http://wordpress.stackexchange.com/

  6. jmkprime
    Member
    Posted 3 years ago #

    Further to what Mike posted - one of the options for register_post_type is show_ui, set that to true and WordPress will automatically add the wp-admin menu for you. It'll also handle all the add, deletion, etc for you.

    [Updated to add reference Mike's post]

  7. rubhadubh
    Member
    Posted 3 years ago #

    Many thanks, another trip up the learning curve for me then.

Topic Closed

This topic has been closed to new replies.

About this Topic