You’ve already got the condition you need in your notificationcss()
function, so just add the exact same code to track_user_logins()
:
function track_user_logins( $user_login, $user ){
if ( !current_user_can('subscriber') ) {
if( $login_amount = get_user_meta( $user->id, 'login_amount', true ) ){
// They've Logged In Before, increment existing total by 1
update_user_meta( $user->id, 'login_amount', ++$login_amount );
} else {
// First Login, set it to 1
update_user_meta( $user->id, 'login_amount', 1 );
}
}
}
Related Posts:
- If post by specific role different css to everyone
- Enable specific CSS Code for Visitors and specific Roles
- Change color of audio player depending on user role
- How do I apply/target CSS to a specific user role or roles?
- Why won’t my custom login page CSS load?
- Show/Hide Div for Login Mask
- How to insert the current user’s role into the body class in the admin backend
- Custom user roles are unable to login
- Hide Login Page Labels
- Change Login CSS – Include instead of echo
- Vertically align text within a div
- Insert image after each list item
- In CSS what is the difference between “.” and “#” when declaring a set of styles? [duplicate]
- How to completely remove borders from HTML table
- How to fix a footer overlapping content?
- What is element.style and why is it overriding my css settings?
- What’s the HTML to have a horizontal space between two objects?
- HTML/CSS float: left; is not working properly
- CSS Div width percentage and padding without breaking layout
- CSS div width not working
- What does the “~” (tilde/squiggle/twiddle) CSS selector mean?
- CSS background-image – What is the correct usage?
- Set bootstrap modal body height by percentage
- Click through div to underlying elements
- How can I fill a div with an image while keeping it proportional?
- Inner glow effect of button
- Remove top admin bar
- How to add a class to ul tags created by the WordPress editor Tinymce?
- Using `auth_redirect` : keeps asking me to login even when I’m logged in
- How to assign user a role if none is present when logging in
- Using theme options to change link colours
- How can I remove css from a child theme?
- Use WordPress with a custom OAuth2 provider
- How to make float element in tinymce
- Are there ways of logging in that bypass wp-login.php altogether?
- How to add 10 different css class to posts
- Can “ and “ tags be used in the HTML editor?
- How to display username and password after registration
- Is there a default style.css
- How to get a value for admin css color either gray or blue
- Adding external stylesheet after ALL other styles
- How can I use PurifyCSS to clean WordPress style.css?
- WordPress CSS doesn’t update
- create bootstrap columns inside editor group block
- Website scroll not working on SAFARI
- Permit Login if table row exists
- Old Site displays on Mobile View, not New Site
- No responsive design is displayed
- Child theme CSS not applying to element
- Set 3 iframes in a row
- Google yolo one tab signup plugin avilable in wordpress? [closed]
- Make CSS Changes To Only Affect Mobile Browser [closed]
- Disable File Editing function
- wp_enqueue_scripts and CSS
- User gets access denied to css files and js files even though user is logged in [closed]
- Can’t call custom css in style.php
- Getting values from options page to css
- Conditionally enqueue a stylesheet based off of a javascript click event
- WordPress 6 – inline container styles breaking my site
- How to make a difference between the portfolio list, and a portfolio item?
- What is the best method to have Dynamic CSS?
- how to stop the shaking effect on my homepage [closed]
- List item images perfect on Chrome/Edge, css fudged on FF/IE [closed]
- Cannot change hover color for links [closed]
- How do I get access to the CSS Editor
- prevent HTML output if custom field is empty [closed]
- Can I protect a type of content site-wide with a single password?
- Style product detail page with custom CSS in woocommerce
- Using variable to display a page with a different stylesheet
- why does this text overlaps in the sidebar?
- JS button animation for ajax the WordPress style
- Adding a new block editor color option to a theme
- Add top parent page id to body class
- New Styles Not Rendering On Mobile Phone and Tablet
- Are there any CSS classes for the wordpress colours?
- Set different css stylesheet for specific pages [duplicate]
- Desktop is class List and Mobile is class Grid
- Extend Cookie with auth_cookie_expiration not working
- Include ElementorPro css into WordPress custom page
- Customizing the CSS for the post/page editor?
- My Child Theme CSS Isn’t Working
- current menu item hover not working?
- how to load basic wordpress css
- Why does WordPress use cookies for /wp-admin and /wp-content/plugins for non-admin users [duplicate]
- Add class when more page is visited
- How do I make a child theme’s style.css load after plugin css?
- WordPress – Portfolio – Change number of items in a row
- Floated element floats into post content in IE, Safari, and Chrome
- How can I pass a variable from PHP to LESS?
- Large Unwanted Space at the Bottom of Blog Posts [closed]
- Managing large CSS files [closed]
- How would I use a media query to make my entire theme responsive or fluid? [closed]
- Clear white line off page [closed]
- Strange symbols on page [closed]
- background changed after WordPress update
- How to make this splash page responsive
- Menu is not styled properly and footer as well [closed]
- Footer in middle of page in different browers [closed]
- Why is the image in div not displayed in full-size?
- How do I add JS and CSS to WP (Flatsome)