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.

Posting to Custom Taxonomy Based on Author's Name & Hidden Field

  1. Say you have a set of people who can post on your site and you've created a custom post_type called, "Reviews." You want each author to post and for their posts to automatically go into a custom taxonomy of their name.

    So you want Mr. Poe to post and have it automatically post into the taxonomy "Mr. Poe"

    Yes, there is the "Gravity Forms + Custom Post Types" add on, but that means that people have to do some input themselves. We're talking about having it happen automatically. It isn't really difficult at all.

    Simply add this code to your functions.php file then configure it to match your site's information.

    Hope this helps!

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  2. Nice, thanks for posting!

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  3. No worries. :)
    You can get pretty complex in how it outputs to the taxonomy too.

    Example... you could have a hidden field that pulls in the author's last name — it has to be hidden with CSS, not made to be "admin only" — then have different drop downs appear based on an array of what that hidden field displays. So it could post automatically to the author's taxonomy and you could give each author a separate list of "topics" (in reality a 2nd taxonomy of the post_type) to choose from when posting.

    Posted 12 years ago on Friday July 6, 2012 | Permalink