Plugin Support
Lap
(@lapzor)
A few months ago another user shared this code that you can try:
function fs_koko() {
$role = get_role('editor');
$role->add_cap('view_koko_analytics', true);
}
add_action('init', 'fs_koko', 12);
You can add it via a plugin like
https://wordpress.org/plugins/code-snippets/
Hope that helps. If you have any questions, please let me know!
Thank you for your reply.
I added the snippet above into the functions.php file but still shows nothing with the Editor user.
Plugin Support
Lap
(@lapzor)
Thank you for your update.
However, I guess the code is outdated and it didn’t work.
Plugin Support
Lap
(@lapzor)
I’ve just tested that code on my own setup and it works for me.
It shows Analytics to the editor.
When you view Analytics from Admin it’s non-zero, or is it zero there as well?
Admin view none-zero
But Editor is zero analytics.
PHP 8.0
Thanks
Plugin Support
Lap
(@lapzor)
In my case it shows the analytics normally when im editor:
https://i.imgur.com/ogLdQt0.png
What I mean to ask is, is this problem really related to the editor role, or is it a general problem in your setup, even for the Administrator role?
It only happens in the Editor role.
Plugin Support
Lap
(@lapzor)
Since it works for me on my own test setup it’s difficult to debug this further via the WordPress forum.
Please send me a link to this thread on support @ kokoanalytics.com
Thanks.