Set Registered User as Post Author

Here’s a little story and a little tip. I was recently speaking with a friend (yes, wizards do have friends) and he was sharing some of the requirements for a site he was working on.

This site needed to have a form that would allow users to submit posts (aka content) to the site, register the user and then make sure the newly registered user was properly attributed as the author of the submitted post.

He was estimating that it would take about 8 – 10 hours to build such functionality. I was very happy to point him to Gravity Forms. He was ecstatic! It took him 30 minutes from start to finish to install and configure his form with Gravity Forms plus the User Registration Add-on! The only piece he was a little confused by was how to set the registered user as the post’s author.

Easy enough! After you’ve added at least one Post field to your form, a new option to “Set as Post Author” will appear on the User Registration feed settings for that form. Check “Enable” and the registered user will automatically be set as the author of the created post.

User Registration Feed Setting: Set User as Post Author

Comments

  1. Jiten
    Jiten August 17, 2016 at 7:31 am

    Hello Wiz,

    Its really helpful for me. But I’m finding a thing now a days that can we use a name from submit form and show that name where author details are displaying in GF I saw only two options that “Default Post Author” and “Use logged in user as author” but If my blogger not registered than how can I show his details or name from submit form?

    ~Jiten

    Reply
    1. David Smith
      David Smith Staff August 17, 2016 at 8:26 am

      Hi Jiten, there are two solutions.

      1 – You can use the GF User Registration add-on and register the user as an author when they submit their post. 2 – You can store the user’s name in a Custom Field and modify your theme to output the author’s name if found and if not, output the custom field value.

  2. Chris
    Chris May 7, 2014 at 11:32 am

    David – Would love to know what your response was to Tommy’s question:

    Thanks David! It turns out that my biggest source of confusion was how to allow a registered user to log into WordPress, without actually giving him access to the wp dashboard. It looks like I need to use something like the Members plugin to restrict access (unless you know of a better way solution).
    Reply
  3. Tommy Oddo
    Tommy Oddo September 13, 2012 at 9:05 am

    Thanks David! It turns out that my biggest source of confusion was how to allow a registered user to log into WordPress, without actually giving him access to the wp dashboard. It looks like I need to use something like the Members plugin to restrict access (unless you know of a better way solution).

    Reply
  4. Tommy Oddo
    Tommy Oddo September 12, 2012 at 9:34 pm

    Thanks David– your posts are very helpful, and especially this one. However, the challenge I now have is that registered users who attempt to submit a new post, can’t. They get an error message: “This username is already registered.” Is there a way to prevent this from happening?

    Reply
  5. Andrew Wetzel (@CircleReader)
    Andrew Wetzel (@CircleReader) May 19, 2012 at 10:31 am

    Hey, Wiz! Just found your site via @carlhancock, and am looking forward to keeping up with your tips! (I’ll be using this one as I rebuild my own site – thanks!)

    (Just a note on the site:  the excerpt for this post reads, in part, “This site needed to have a form that would to the site, register the user and then…” Looks like the link was stripped…)

    Reply
    1. David Smith
      David Smith Staff May 19, 2012 at 12:41 pm

      Thanks for pointing that out Andrew. Hope you find the site to be very useful! If you have any suggestions for improvement and or ideas for snippets please do let me know. :)

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.

Grab a bundle of free Gravity Forms plugins

Enter your email and receive our most popular free plugins and snippets, plus access to hundreds of others.

This field is for validation purposes and should be left unchanged.