I'm trying to make a social network using WordPress and BuddyPress but I'm open to change any of this if anyone thinks there is a better option to solve my problem.

I have been for a while trying to make something that may seem stupid, but is fundamental for my web, I wanna create a user in WordPress that belongs to two different persons, meaning two names, two mails, two passwords..., but both connected to each other, everything any of them do is like made for "the user" but been able to check who of them realy did it (at least internally), that way I can delete/modify my content but not my partner's content. It would also be great if I could separate the users in two if necessary

I think I have tried any plugin there is but haven't found any allowing you to do such a thing, I'm also not sure if WordPress can do that or maybe I should try another CMS.

I have run out of options and accept any suggestions you can make me.

Further information:

I need this for two people publishing as one couple profile, not just as one of them, but I need them to be different profiles (not just one account with a few more extra fields) because I want those couple to be able to break up and join another one keeping their content.

I'm no more looking for a plugin (even though it would be great if someone knows any) but I am more interested in advice on how to approach the problem at the programming level

  • What you're asking for sounds like 2 separate users, I'm not sure what it is you're asking for? What exactly is the functionality you wish for? Is it that you want 2 accounts, but everything they post appears as if it's a single person from a visitors point of view? – Tom J Nowell May 8 '18 at 15:18
  • As an aside, plugin recommendations are out of scope here – Tom J Nowell May 8 '18 at 15:19
  • Yes @TomJNowell, just like that, two user accounts publishing with a single reference. – Alvaro Rabadan Garcia May 8 '18 at 16:15
  • Would it suffice if the user settings page had a dropdown that changed the default author of posts created by that user from themselves to somebody else? – Tom J Nowell May 8 '18 at 17:12
  • No, I want to group users into a profile, everything users can do, not just change the author of some post – Alvaro Rabadan Garcia May 9 '18 at 6:18

I suspect what you actually want, is to have all content showing as being authored by the same person.

So, simply create a 3rd user, and set it as the author of your posts. The revision log will keep track of who did what

e.g. https://www.siteground.com/kb/change-author-post-wordpress/

  • Not at all, two persons publishing as one, not everything in the blog published under the same nickname. I've also mention BudyPress, the idea is to create a social network and I'm more interested en deleting all the content of one of the users if they have any kind of misunderstanding and one of them wants to leave but the other one prefers to stay. – Alvaro Rabadan Garcia May 8 '18 at 16:19
  • That's a very unusual requirement, in which case my answer has the solution, but the means I suggested is not what you need. You need to create that user and then assign it as the author in code. If you're looking for something you can just download and install, or a CMS that does this already, you'll be looking for a long time. But I suspect that this is an attempted solution at an older problem you haven't mentioned – Tom J Nowell May 8 '18 at 17:11
  • Also, can you add the info from your comment to the question? Provide as much context as possible, it isn't clear what the functionality is intended to do, e.g. is this some way for couples to post as the couple rather than as themselves? Or a business profile? – Tom J Nowell May 8 '18 at 17:14

What you want is a separation of users and "user profile", and the ability to associate user (humans) with user profiles.

there is actually a demand for such a feature, and you are not the first to ask for something that when it is stripped to its core, end up being solved with such an abstraction. Problem is that there is no such intermediate abstraction layer in wordpress (nor any plugin AFAIK that provides it).

You can create one yourself, by creating a "user profile" CPT, associate users with specific profile via their/its meta, and replace author related indications to derive the information from the user profile instead of the user itself. This is not rocket science, but there are many small modification via filters that will need to be done, and obviously a fair amount of admin screens to manage it.

Not a rocket science but not an afternoon project as well.

  • I've done some CPT, but never involving user modifications. Just to be clear, you are propossing to create a Custom Post Type allowing two authors instead of one that would be the "user profile page" and to asociate normal content to this new CPT or did I misunderstand something? – Alvaro Rabadan Garcia May 9 '18 at 7:11
  • yeh, you got it right. actually maybe a custom taxonomy can be better. You use the CPT to store which users are associated with the profile, and based on that profile override the user permissions where needed – Mark Kaplun May 9 '18 at 8:25

Your question is not completely clear, but I guess that you want two users in the backoffice, each with their own posts and editing rights, but represented as one user on the frontend. And if you decide otherwise, you want to be able to split them up again.

The best way to do this is filtering the author information when generating frontend pages. Which information this is, depends on your theme, but it would at least involve the_author filter, modifying the name as displayed on the page. Like this

add_filter ('the_author', 'wpse303025_change_author');
function wpse303025_change_author ($display_name) {
  switch ($display_name) {
    case 'John' : $display_name = 'Frank'; break;
    case 'Jack' : $display_name = 'Frank'; break;
  return $display_name;

With this filter both John and Jack will be shown as Frank on the frontend, but you can reverse that by changing the filter.

There will be more filters to install, such as author_link. If you want an actual author page for 'Frank' you would probably need a user account with that name to keep things simple.

  • Yeah that's quite the idea, but I'ld also need it to be user friendly, meaning the users has to be able to choose their partners from the beginning and they must have a common authors page (Just one for both of them). – Alvaro Rabadan Garcia May 8 '18 at 16:26
  • That would mean the filter has to take into account a setting ('my partner') which you would add to their user profile, possibly as a dropdown of all users without a partner. The common author page is trickier. Perhaps you could synchronize the two profiles, but that has drawbacks. – cjbj May 8 '18 at 16:41
  • I'm thinking about something like a main user account with two "slave accounts". That can works with the idea of the filter you mention and kind of helps with the profile page, at least in theory. – Alvaro Rabadan Garcia May 8 '18 at 17:28
  • That would mean significantly altering how WP handles users. Doable, as @MarkKaplun says, but might lead to compatibility issues with themes and plugins. – cjbj May 8 '18 at 18:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.