Set default page for user account in admin

You set a custom url after rewrite from a login. A small example, usable in a template of the theme to login. <?php $redirect = esc_url( ‘your-url’ ); if ( ! is_user_logged_in() ) { $link = ‘<a href=”‘ . get_option( ‘siteurl’ ) . ‘/wp-login.php?redirect_to=’ . home_url( “https://wordpress.stackexchange.com/” ) . ‘”>’ . esc_attr__( ‘Login’, ‘documentation’ ) … Read more

I am adding a new class to my body tag if the logged in user is subscriber, need help

Please try this code instead- add_filter( ‘body_class’, ‘wpse_268176_body_class’ ); function wpse_268176_body_class( $classes ) { $user = wp_get_current_user(); if ( in_array( ‘subscriber’, $user->roles ) ) { $classes[] = ‘class-name’; // your custom class name } return $classes; } Place this in your active theme’s functions.php file. [Thanks Dave Romsey for your suggestion.]

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)