check if admin
This snippet checks if the logged in user has admin permissions and executes code if true.
if( current_user_can( 'administrator' ) ){
// do something
}
copy
This snippet checks if the logged in user has admin permissions and executes code if true.
if( current_user_can( 'administrator' ) ){
// do something
}
copy