post author can display only own post on front end ?

QUESTIONS & ANSWERSCategory: WordPresspost author can display only own post on front end ?
Profile photo of madmad asked 6 months ago

hi, i have a multi-author blog where users can submit custom post from front-end with a specific plugin, now i want display the analytics data for only property post to the author.
now I see that on the front end all the authors can see the statistics of all pages, this is not good for my project.
In addition the level of the authors in my site is “Contributor”,  how i can do this , you have a snippet for this new feature ?
thanks 🙂

2 Answers
Profile photo of Alin MarcuAlin Marcu Staff answered 5 months ago

Hi,

This can be achieved by making use of the multiple hooks the plugin has. You just need a custom add-on (a tiny plugin) to unhook the stats when needed based on user. The plugin code is available here: https://github.com/deconf/Google-Analytics-Dashboard-for-WP.

Profile photo of madmad answered 5 months ago

hi, thanks for reply
you have a list of action hooks that I should use? you can provide more information about it ?
 
thanks