Skip Navigation

[Resolved] Admin unable to change post type author

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 8 replies, has 2 voices.

Last updated by Waqar 6 years ago.

Assisted by: Waqar.

Author
Posts
#1154841

Hi, I cannot change the author for the custom post type I have set up. I am logged in as Admin.

#1154879

I can see the drop down within the post but only admin is selectable.

#1155373

Hi Lewis,

Thank you for contacting us and I'll be happy to assist.

I performed few tests on my website, but couldn't reproduce this issue.

Can you please check if there is another user available on your website, whose user role is not "admin", but that user role still allows him/her to edit that specific post type?

Please also test this with all non-toolset plugins disabled and with a default WordPress theme like Twenty Seventeen, to rule out any code conflict.

In case the issue still persists, you're welcome to share temporary admin login details, in reply to this message, for further troubleshooting. Your next reply will be private, which means only you and our support team will have access to it.

Important note: Please make sure that a complete backup copy of the website has been made, before sharing the access details.

regards,
Waqar

#1156431

Hi Lewis,

Thank you for waiting, while I performed some testing and research on the topic.

The way WordPress handles author selection drop-down, only users with roles "Contributors" and above are included, without the custom user roles.

This has been reported and the discussion is available at the following thread:
https://core.trac.wordpress.org/ticket/16841

In future WordPress versions this behavior is expected to change, but for now, you can include the following code in your active theme's "functions.php" file:
( ref: https://developer.wordpress.org/reference/hooks/wp_dropdown_users_args/ )


// include all user roles in the author drop down
add_filter('wp_dropdown_users_args', 'include_all_users_custom_func', 10, 2);
function include_all_users_custom_func( $query_args, $r ){

	$query_arg['who'] = 'any';

	return $query_arg;
}

I hope this helps.

regards,
Waqar

#1157705

Hi, thanks that has seemed to have done the trick.
Quick question: When a new role for example a membership/classified site is created what 'Copy Privileges' would you give?
Many thanks in advance.

#1157754

Hi, I have now changed the post author successfully on the custom post to one of the 'Member' users but the specific user shows no post assigned to them?

#1157892

Hi Lewis,

Thanks for the update and glad that the code works.

To start with the minimal control, you can copy the privileges from the "Subscriber" role which is the most basic one. After that, more privileges can be added to that custom role, as needed.

Can you please share exactly on which page/screen the user's assigned post is not showing and also which user are you referring to?

Important note: The login details that you've shared earlier no longer seem to work, so please make sure to enable an admin user account with the same username and password, so that I can access the admin area.

regards,
Waqar

#1157907

Hi, you can access the dashboard now with the same details.
Under the users tab 'thesloopinn' shows as 0 posts. You can see that under the CPT of 'members' there is a post assigned to the user 'thesloopinn'.

Also I am trying to create a 'Forms edit-post link' but there are no options under 'Fields and Views' for 'Forms Editing'?
Thank you for your patience.

#1158739

Hi Lewis,

Thanks for writing back and for enabling the access again.

If you're referring to the "Posts" column on the "Users -> All Users" screen ( hidden link ), WordPress only counts regular "Posts" not custom post types for that column.

To make that column also use custom post types, custom programming will be needed to extend WordPress, which I'm afraid, is beyond the scope of support that we can provide. The following thread should help in getting started in the right direction:
https://wordpress.stackexchange.com/questions/3233/showing-users-post-counts-by-custom-post-type-in-the-admins-user-list

As for form's editing link, you'll find a dedicated "Toolset Forms" button, for the forms related actions.
( screenshot: hidden link )

Here is a detailed guide on the topic:
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/

For future reference, please note that as per our support policy ( https://toolset.com/toolset-support-policy/ ), only one question or concern can be addressed in a single ticket.

To ensure most efficient and timely support, please open a new ticket for each new question/concern.

regards,
Waqar