Google Tag Manager

Totally fair, Warren — this part trips up a lot of people. Let’s break it down clean and clear: 🧠 The Two Parts of GTM Code 1. The Short Code This is your GTM Container ID — it looks like:…Continue reading

Hindra åtkomst till /wp-admin för prenumeranter

/** * Hindra åtkomst till /wp-admin för prenumeranter */ add_action( ‘admin_init’, function() { if ( is_user_logged_in() ) { $user = wp_get_current_user(); if ( in_array( ‘subscriber’, (array) $user->roles, true ) ) { if ( ! ( defined( ‘DOING_AJAX’ ) && DOING_AJAX…Continue reading

Dölj admin-baren för prenumeranter

/** * 2) Dölj admin-baren för prenumeranter */ add_filter( ‘show_admin_bar’, function( $show ) { if ( is_user_logged_in() ) { $user = wp_get_current_user(); if ( in_array( ‘subscriber’, (array) $user->roles, true ) ) { return false; } } return $show; });Continue reading