Remove from a div by class name from post page if post author role is not administrator

Basically you are asking a function to check the post author role. You can use user_can() function. if(user_can(‘administrator’)) { //Write your code if the admin } current_user_can() : https://codex.wordpress.org/Function_Reference/current_user_can user_can() : https://codex.wordpress.org/Function_Reference/user_can

My plugin can’t see my files

Answering my own question just in case someone comes across it looking for an answer. Managed to figure it out! We have to get the URL as follows, we can’t just reference it like we normally would on a server plugins_url( ‘products.csv’, __FILE__ ); The above code returns the information we need, rather than just … Read more

WordPress Cron function is not working

Are you constructing the class properly? Is the file writable? Do you need the interval or can you add the scheduled item if it doesn’t exist. This example is working, and sets an event 10 seconds into the future. wp_schedule_event( time() + 10, null, ‘ga_order_syn’ ); class CronTest { function __construct() { add_action( ‘init’, array … Read more