I have a listing site set up. I have a custom role called "artist" and a cpt called "artists". I have a front end user page setup and a view to show the listings of logged in user. I have all of the mentioned so far working fine.
Hello. Thank you for contacting the Toolset support.
Do you mean that you have a Toolset Edit form created using Toolset Form and when you click on that Edit link you want to see that author (role) dropdown on your edit form? If this is correct - there is no such feature to add a author dropdown to the Toolset edit form.
Sorry, No. I do have a toolset edit form and it works as expected. What I'm looking for is to be able to change the post author to a different user. The only options I'm getting for changing the author are admins. I need the users that are assigned to the custom role "artists" to be an option.
Can you watch this quick screencast to see what I mean? hidden link
Ok great - thanks for sharing the video, that clarifies it.
You want to have artist authors displayed with your author dropdown.
Can you please share access details so I can see whats going wrong.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I've added the following code to "Custom Code" section offered by Toolset:
=> hidden link
function func_quick_edit_autor_dropdown( $query_args, $r ) {
// adjust role names you want to display with author dropdown
$query_args['role_in'] = array('administrator','artist','author');
// Unset the 'who' as this defaults to the 'author' role
unset( $query_args['who'] );
return $query_args;
}
add_filter( 'wp_dropdown_users_args', 'func_quick_edit_autor_dropdown', 10, 2 );
I can see artist role now. You can adjust the roles you want to display with the above code.
Fabulous! Thank you. I was able to implement that on the live site and it works.
However, now, when I login in as an artist, I'm not seeing the edit button on the post I created. I'm seeing it on the dev site that you were on, but not my live site. Did you change access permissions on the dev site? It's not working as expected on either site.
On the LIVE site, I login as an artist and I see the listing I "own" but I don't see the "edit listing" button. When I'm logged in on the DEV site, I see my listing and the "edit listing" button, but I also have access to the backend and other posts, which we do not want.