Custom Content Type Manager
How WP and CCTM Create Posts (3 posts)

  1. pha3z
    Posted 3 years ago #

    So I'm trying to learn how WP actually creates posts so that I can THEN understand how it works when you have custom content types with custom fields. I found this page explaining basic WP:

    So how does it work when you're submitting a custom content type or any content type with custom fields? Do you just add the additional fields to the array as normal?


  2. pha3z
    Posted 3 years ago #

    I think I found it...


    You just add an action to fire a custom function when a post is saved. You use the custom function to call update_post_meta()

    So this is basically what I was trying to talk about on Issue 170 and 132 on the CCTM site discussion. Why not go ahead and generate page templates to display an edit/submit form. And just allow the user to send the submitted form to WP. All you'd have to do for WP is attach the necessary action to save the meta data (custom fields).

    NOW you should be able to see what I've been talking about. Since CCTM already manages custom posts and already generates a page viewer template, why not generate edit/submit form templates as well? It gets the developer one step closer to quick implementation of an entire front-end for working with custom content types. The last step would be to generate code which automatically inserts the meta data.

    I guess I just don't see CCTM as having ot be a complete UI package that solves all the problems for you. The way I envision using it is creating content types (modifying content types if necessary) and then generating the code to work with them from a front-end user-submission perspective.

    If I wanted to have a homerun package that doensn't require me to cut and paste some code and messs with templates, I can wait a month or so and just buy Types and Views. Types and Views already does a bunch of custom content management and they are in the process of adding functionality for user-submitted front-end.

  3. fireproofsocks
    Plugin Contributor

    Posted 3 years ago #

    You may want to look at one of the other classes included in the CCTM: SP_Posts -- it offers a simple API that deals with both the primary database table (wp_posts) and the secondary table for all meta data (wp_post_meta). Again, that's a class that was conceived due to limitations in the WP core.

    I added some docs to the wiki that may be useful to you:

    I'm still not 100% confident I'm following you and what you're after... I THINK I do, but there's been some head-scratching here. When defining specs or desired functionality, it's always clearer to you than it will be to someone else, so don't underestimate the value of screenshots/videos/images etc. I never heard someone say "this is over-spec'd".

    Essentially, in order to implement the feature described in issue 132 (http://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id=132), I'd be tying into the various field classes to generate the form elements and using SP_Post to handle submissions.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Content Type Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.