Home › Forums › Calendar Products › Community Events › Assigning Event to Another Author
- This topic has 14 replies, 3 voices, and was last updated 9 years, 9 months ago by
Cliff.
-
AuthorPosts
-
July 18, 2016 at 5:05 am #1140979
Michael Burke
ParticipantHi.
A while back I started this thread: https://theeventscalendar.com/support/forums/topic/admin-on-frontend/
When I choose to show the Author on the event screen, I do see the dropdown box near the bottom. However, when I click on the dropdown, I (myself) am the only available option to choose from the dropdown, despite having multiple users on my site.
Can you explain why the other users are not showing up?
Thanks
MikeJuly 18, 2016 at 8:13 pm #1141306Cliff
MemberHi.
There might be some new updates available. Could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?
Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.
If it is, please follow our Testing for Conflicts Guide and see if that helps narrow down the cause of this.
If it doesn’t, please share your System Information. That will give me a lot of extra information to help diagnose the problem.
Let us know what you find out.
Thanks.
July 19, 2016 at 3:55 am #1141388Michael Burke
ParticipantHi Cliff.
-I updated all plugins (and core)
-I disabled all plugins except TEC plugins
-I switched to TwentySixteenThe problem still persists. Then a thought occurred to me: I am using the plugin “User Role Editor” to create customer roles for my client (Volunteer, Team Coordinator, etc) instead of “Editor”, “Contributer,” etc. I tried creating a user with one of those standard roles, and it worked. Popped right up in the Author box.
So my question is – is there some way to make TEC recognize my custom user roles? Specifically the role of “Team Coordinator” ?
Thanks.
July 19, 2016 at 6:14 am #1141417Cliff
MemberThank you for your excellent reply.
Since the Add/Edit Events wp-admin screen is just like editing other Pages or Posts, the Author metabox should work the same as on those other editing pages if the user has the proper credentials.
I’d suggest referring to this information:
I hope that helps you determine what capabilities you need to assign to your custom roles to allow selecting them in the Author metabox when editing an Event in wp-admin.
Please let me know how it goes for you.
July 19, 2016 at 9:29 am #1141507Michael Burke
ParticipantOk. Based on the suggestion of your article, I switched to the “Members Plugin”
I have granted the customer role of “Team Coordinator” all permissions pertaining to TEC.
Unfortunately, the user I created with this role does not show up in the Author drop down box on events. Am I doing something wrong?
I would be happy to provide admin credentials to the site if that would help.
July 19, 2016 at 10:17 am #1141598Cliff
MemberSorry you’re still having trouble.
Did you go through the “Full list of capabilities” from our help article?
Please provide me some screenshots of your Members setup (we try to not ever login to customers’ sites).
Thank you.
July 19, 2016 at 10:50 am #1141614Michael Burke
ParticipantHi Cliff,
I know that if I assign a user the role of “Editor” then they show up in the Author box. So, I Members plugin to clone the Editor role and called “Team Coordinator1”
I created a user and assigned it this role, but no luck. It still doesn’t appear in the Author box. 🙁
I’d be happy to provide screen shots, can you be more specific of what you want screen shots of?
July 19, 2016 at 3:02 pm #1141701Cliff
MemberPlease send me a screenshot of your setup in the Members plugin for the custom role you’ve created — so I can see all the permissions granted to that role.
July 20, 2016 at 4:12 am #1141834Michael Burke
ParticipantHere you go:
Note: it wouldnt let me upload the last screen shot, but I’ll tell you that no permissions were granted and these were the capabilities:
update_plugins
update_themes
upload_files
ure_create_capabilities
ure_create_roles
ure_delete_capabilities
ure_delete_roles
ure_edit_roles
ure_manage_optionsJuly 20, 2016 at 12:30 pm #1142091Cliff
MemberHi Michael. Thanks for all that information.
I tried getting it to work via capabilities (similar to how you did) and couldn’t get it working either.
I believe the author box comes from this code in WordPress core: https://github.com/WordPress/WordPress/blob/4.5.3/wp-admin/edit-form-advanced.php#L310-L313
Anyway, here’s a code snippet that will make it so ANY registered user of any role/capability will be selectable via the Author metabox on the wp-admin edit screens (not just for Events).
function expand_author_selection_list( array $user_args ) { $user_args[ 'who' ] = ''; return $user_args; } add_filter( 'wp_dropdown_users_args', 'expand_author_selection_list' ); // https://developer.wordpress.org/reference/hooks/wp_dropdown_users_args/I hope this helps you get closer to what you’re wanting. If you need some coding help, you may want to ask your developer or reference our list of known customizers.
July 20, 2016 at 1:48 pm #1142128Michael Burke
ParticipantHi Clif,
Ok I realize you don’t want to delve deep into coding help and I completely respect that – but just a little guidance?
This is what I did:
I downloaded the file wp-includes/user.php to my local system
I added the snippet of code you provided to bottom of the file
I uploaded the file into my child-theme in a folder called ‘wp-includes’It had no effect so obviously I did something wrong. Can you provide any help? (by the way, I AM the developer LOL, but I’m a designer, I don’t know PHP)
July 20, 2016 at 3:12 pm #1142183Cliff
MemberWelcome to WordPress customizing!
Best practice for adding custom code (like to implement a PHP snippet to modify The Events Calendar) is to create a functionality plugin, unless it’s something specific to your theme, in which case best practice is to make sure you’re using a child theme, then add the customization to your child theme’s functions.php file.
You definitely should NOT touch/copy/anything with the /wp-includes/user.php file.
You should simply copy the code snippet I provided into either a functionality plugin or your child theme’s functions.php file.
As always, you should consider all code you enter into your site (i.e. no guarantees from us).
I hope this information helps!
July 20, 2016 at 5:58 pm #1142233Michael Burke
ParticipantSUCCESSSSSSSSS!
I dropped the snippet into the functions.php file of my child theme as per your instructions. It worked.
Cliff – thank you very much for your help and patience with this matter, it is greatly appreciated!
July 20, 2016 at 6:42 pm #1142240Cliff
MemberAwesome! Glad to hear. Have a great evening.
-
AuthorPosts
- The topic ‘Assigning Event to Another Author’ is closed to new replies.
