I've created a little site for myself. I can list quiz nights I've run, and then use a taxonomy to assign a venue to that quiz night. It works well.
Issue is I want to create a login for a friend of mind, so he can list his quiz nights.
I am thinking that using a taxonomy for the venue won't let this operate well?
For example, you can list all venues and see how many times you have run events there. If I have two users, I don't think I can just so the post count for the logged in user? I think it will show all the posts?
I also can't have separate venues for different users.
Should I start again and use a custom post for venues? So for example if I run an event at Joe's Pub, I create an entry in the CPT venues and I can then list events. But only I see Joe's Pub as I created it.
Then, if my friend also runs an even at Joe's pub, he could add Joe's Pub as well, and then it would be two separate records, independent of each other.
You are right about taxonomy counts. If you both have had 3 quiz nights at Joe's Pub, then the post count for Joe's Pub will show 6 if you are displaying it.
But you in your Views with an author filter, you can use the shortcode wpv-found-count which will display the count of matching results, and if your View also includes a taxonomy filter then it would show the correct number.
I'm thinking a better way would have been to make the venues a CPT as well? Would you do that?
The benefit of that is that I could have a list of venues I've added that are just mine, and he can have just his, regardless of it they are the same or different.
I wasn't aware I could filter the post counts though so that's interesting! Thank you!
Sure, you could create a venue CPT and use a relationship to connect it to your other post type(s). (I'm not sure what they are, but something like an 'event' post type? Whatever you were assigning the taxonomy to.)
It seems a bit redundant creating two "Joe's Pub" posts, but it would certainly achieve the effect of keeping your content separate.
I think I wanted more of a web app type feel? So something that isn't public, and the records are just for the person logging in. All records completely independent of each other.
Thank of it more like say, Zoho Invoice or Xero or something - online accounting software
If two customers have two accounts and both add a client record of Joe's Pub, they would be completely independent of each other, and if one deleted Joe's pub as a client it wouldn't affect the other person.
If you used relationships you wouldn't be deleting Joe's Pub, you would be disconnecting from it, while the other user may have posts that remain connected to it.
I feel like I only have half a description of what you are doing, in terms of the types of content and workflows involved, and if you give me a more complete description I could describe how I would go about implementing it.
I want everything separate. So if I make a login for someone, they login and there are no events and no venues. They add their own venues, and then add their own events to their venues. They don't need to see anyone elses venues - it's purely there.
Just like as I mentioned, if you have an an online accounting system. You don't login and see everyone elses customers, you add your own (even if you have the same customer as someone else)
Is this all happening in the backend rather than with frontend forms?
In which case it seems like you want to specify a role for users submitting content (different than the admin role you manage the site with), e.g. author.
The defaults for author are that they can publish and edit their own posts, but not those of other users (screenshot, from Toolset > Access Control, if you are using Access).
If outputting lists of events/venues on the front-end, you can include a Query Filter for the post author so that users can only see their own posts (screenshot).
I just need to make the venues a post type instead of taxonomy, so that users can login, add their own venues independent of other users who can login.