Remove access to TagDiv Templates and other CPTs

Posted in: Newspaper
Post count: 623

Hello @ncalex

It would be a great help if you could provide an option to control access to Cloud Templates, Library, and Reviews.
Users with editor roles can edit Cloud Templates; I want to remove that ability.

Post count: 35449

Hi Amit,
Yes, right now the admin and editor can edit the cloud templates.
What it can be used in this situation is a function that will display the cloud templates only if the logged user is an admin.
Here is the code – https://pastebin.com/P3aWUA7M and it can be set in a child theme in functions.php
I hope this will help you!

Post count: 623

Hi Calin,

Thanks for the quick solution.

With the code you provided, I was able to remove the Cloud Templates option from the dashboard menu. Still, the editor can see the Edit with tagDiv Composer (green) button, which appears on the front end.

Post count: 35449

Hi,
Indeed, I made a better code – https://pastebin.com/Z2QHR3pf
I hope this will remove the option from all possible locations.
Let me know the results!

Post count: 623

Hi,

It seems that the task was successful, but there appears to be a bug. It appears that editors are unable to view images when accessing the Media Library.

Post count: 35449

Hi,
Yes, it seems that this problem appears due to the css tags in the remove_cloud_templates_for_non_admin function, there need to be used a different solution to not use the style tags when the add_action is used on admin_menu.
I asked a developer to give me a better solution and when I get an answer I will let you know.
Thank you for your understanding!

Post count: 2

Hello there, any updates on this matter? Is there a way for the tagdiv editor only avaliable to admin?¿

Thanks

Post count: 35449

Hi tony7pt, if you want you can use a function, this code can be set in a child theme in functions.php, the code can be get from here – https://pastebin.com/ryZys9Az
Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.