Looking For Directory Solution

I have an upcoming project and I wanted to reach out to the awesome community at WPMU.

Here's the need:

I want to a create a directory site with some very specific needs:

1) Custom fields
2) Sales must be able to add the listings.
3) Sales must be able to assign each listing to a specific client.
4) The public can not login or create their own listing as each listing requires pre-payment.

I can use WP-Types, etc to create the actual interface, custom types, etc, etc, but where I am looking for advice is the workflow where I have a salesperson create a listing and then assigning it a new user they create with the account.

I am almost thinking this will require a custom submission form for sales, but I would like it "cleaner" if possible.

I did see the directory listing at WPMU but I am not sure it will be custom enough...

Thanks for any insight.

  • Michael Bissett

    Hey @maxwebgear, hope you're doing well today! :slight_smile:

    where I am looking for advice is the workflow where I have a salesperson create a listing and then assigning it a new user they create with the account.

    I am almost thinking this will require a custom submission form for sales, but I would like it "cleaner" if possible.

    So the salesperson creates the listing first, and then creates a user for the client, thereafter assigning the listing to that particular user?

    When would the client need to log in to the site?

    What kind of custom submission form did you have in mind?

    Please advise,
    Michael

  • Michael Bissett

    Hey @maxwebgear,

    Hmm... this sounds like something that would need to be custom coded, I'll admit that this is a different way of handling directory listings than what's usually handled in plugins.

    That said, when the form is submitted, it sounds like the following needs to be done:

    - The user is created (the username possibly based off of the client's email address?), using either the wp_create_user function or the wp insert user function.
    - Create a new post in your custom post type, and then assign the user as an author, using the wp_insert_post function, and, when it comes to providing a detail to use for the 'post_author' part of the array for that function, possibly referring to the $user_id variable specified in one of the two functions used for creating the user above.

    That's what I'm seeing right now. :slight_smile:

    Kind Regards,
    Michael

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.