Home Forums Plugin Support WP User Frontend Pro Merge registration post with post insert

This topic is: resolved

This topic contains 7 replies, has 2 voices, and was last updated by  foriaa 5 years, 6 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #6289

    foriaa
    Participant
    Post count: 6

    Hello
    I need to have a form where the user can register and insert his post.
    If I create this 2 kinds of form after can I insert them together in a page?

    thank you

    #6293

    Tareq Hasan
    Keymaster
    Post count: 2831

    Inserting them together doesn't help the user, it'll be confusing I think.

    You can create a registration form and the redirect url should point to a page with post form. So upon registering, they will be redirected to a post page.

    #6312

    foriaa
    Participant
    Post count: 6

    In realty I saw with pleasure that in the post settings there is an option to submit a post by the guests, and is it possible to register them automatically by insert a name and an email address. Great it was what I need ๐Ÿ˜‰
    So if it was provided maybe it is not too confusing for the users!

    #6314

    foriaa
    Participant
    Post count: 6

    Ok but now I need to have the custom fields which populate extra edit profile fields in the user profiles in backend.
    In the settings I can select just a registration form ๐Ÿ™

    #6322

    Tareq Hasan
    Keymaster
    Post count: 2831

    The registration form and profile forms are the same, but the use case is different. Thats why get two shortcode for a registration form (profile & register). Selecting the registration is fine ๐Ÿ™‚

    #6338

    foriaa
    Participant
    Post count: 6

    Sorry but maybe you don't understand what I need.
    So, I need a form with registration form, enclosed some custom fields for the user profiles, and together a post form.
    In the begin of this discussion you said me that it was confusing for the user, which for me is equal to say it couldn't be create it. Ok.
    After I found a great feature in your plugin, ALONE, in post form settings, where I can automatically register guest user when they submit a post. So I was near to the solution.
    Now, I need to have the same custom fields asssociate to user profiles in the registration form inside the guest registration in post form, that's all!
    It should be very pleasure to get a really help by you and not only critics about what I do with my website and some very superficial replies.
    I bought you PRO plugin, business pack, and I'm looking forward to be supported in the right way.
    Please read well my issue and if you don't understand ask me more details.

    I hope your next replies will be more constructive then previous.

    Kind regards

    #6359

    Tareq Hasan
    Keymaster
    Post count: 2831

    I completely understand what you said. I just replied to your previous question.

    Anyway…
    [php]
    function wpufe_copy_post_meta_to_user( $post_id ) {
    $custom = get_post_custom( $post_id );
    $post_author = get_post_field( ‘post_author', $post_id );

    if ( $custom ) {
    foreach ($custom as $meta_key => $meta) {
    $meta = maybe_unserialize( reset( $meta ) );
    update_user_meta($post_author, $meta_key, $meta);
    }
    }
    }

    add_action( ‘wpuf_add_post_after_insert', ‘wpufe_copy_post_meta_to_user' );
    add_action( ‘wpuf_edit_post_after_update', ‘wpufe_copy_post_meta_to_user' );
    [/php]

    It's a PHP snippet that you can place it in your themes functions.php. What this does is, when a user publishes a post, it copies all the post meta to that user. So in your case, when the guest registers automatically upon creating the post, all the post meta will also be copied to his user profile (user meta). I think thats what you are trying to achieve?

    #6419

    foriaa
    Participant
    Post count: 6

    Thank you for your reply.
    I insert your code in my theme function.php but it doesn't work.

    However it doesn't matter, I modified the frontend-form-post and render-form to get what I need.

    thank you very much

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Merge registration post with post insert’ is closed to new replies.