Logged in User Drop Down Menu
[user_avatar] [display_name] Manage Membership Log OutContinue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
[user_avatar] [display_name] Manage Membership Log OutContinue reading
// This creates an avater Shortode function bb_logged_in_user_avatar_shortcode($atts) { if (is_user_logged_in()) { $current_user = wp_get_current_user(); $avatar = get_avatar($current_user->ID, 96); // 96 is the size in pixels return $avatar; } else { return ”; } } // This creates an USER…Continue reading
Shop Doggyography Blog Contact More than a collar. A nightly transformation. An expression of identity. A statement of love. Your dog deserves to be seen. …And you deserve to walk without worry. The Night Everything Changed Late one night, in…Continue reading
function rd__current_user() { static $u = null; if ($u !== null) { return $u; } $u = wp_get_current_user(); // Core: sets current user if not already set. return $u; } /** [user_first_name] */ function rd_sc_user_first_name() { static $first = null;…Continue reading
Shop Doggyography Training ContactContinue reading
add_action( ‘wp_dashboard_setup’, function () { global $wp_meta_boxes; $wp_meta_boxes[‘dashboard’] = array(); remove_action( ‘welcome_panel’, ‘wp_welcome_panel’ ); }, 1000 );Continue reading
/** * Disable the emojis in WordPress. */ add_action( ‘init’, function () { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’,…Continue reading
/** * Disable the emojis in WordPress. */ add_action( ‘init’, function () { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’,…Continue reading
function custom_login_logo_url() { return home_url(); // Or your desired URL } add_filter( ‘login_headerurl’, ‘custom_login_logo_url’ );Continue reading
add_action(‘after_setup_theme’, ‘remove_admin_bar’); function remove_admin_bar() { if (!current_user_can(‘administrator’) && !is_admin()) { show_admin_bar(false); } }Continue reading