Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: [Resolved] Is it possible to use Users as children of posts?

$
0
0

Max,

I have a similar set up as your, though maybe not as large. How I have solved this for my purposes is basically this.

Members (companies) of our association are set up as a custom post type. Each company, then has a Member record (Custom post) that includes a lot of the same data you mentioned.

Users are associated to the Member by a user meta field. I started out using the Post Tile (name of company) of each member, but got bit by the way WP stores titles. It worked great except for company names that included non-alpha characters. For example Billy Bob & Sons or Big Al's BarBQue. So I went back and used the custom post id of the member as a user meta field.

I use CRED forms and WP-Types and Views to allow users to create and display things like job openings, news articles and the like. Having the Member Post ID for the user's company in their user meta allows me to connect them to their respective company. It also allows me to set the company as the parent of the other custom post types for job openings, etc. and make sure users can only edit and insert posts on behalf of their company.

It takes a few functions and custom shortcodes, but it works. I also made a custom template to display a directory of the companies with all their related users.

I am no PHP expert, but have been able to glue it all together.

I hope this helps.


Viewing all articles
Browse latest Browse all 20145

Trending Articles