You need the !is_admin()
check. This will return false on admin pages, failing your condition. On front end pages, that condition will return true, executing your conditional statement
if ( !is_admin() ) {
// Do something only on frontend
}
You need the !is_admin()
check. This will return false on admin pages, failing your condition. On front end pages, that condition will return true, executing your conditional statement
if ( !is_admin() ) {
// Do something only on frontend
}