PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Incorporating WP_Insert Function

  1. I'm not certain if this is the proper forum to add this...but here goes.
    I am building a rather extensive social media site that is very "user contribution" based. As such I would like to be able to include the capability to allow users to add their own categories. Is there a way (unbeknownst to me currently) that a field (single line text) can be added (to Advanced or Post Fields) which would allow for this? Possibly using the wp_insert function?

    Posted 11 years ago on Tuesday December 4, 2012 | Permalink
  2. I think you could use the wp_create_category function:
    http://codex.wordpress.org/Function_Reference/wp_create_category

    Using the gform_after_submission hook, you could run code to create that category, then update the existing post with the new category.

    Posted 11 years ago on Thursday December 6, 2012 | Permalink
  3. Moved to regular support forums.

    Posted 11 years ago on Thursday December 6, 2012 | Permalink