user-has-not-earned class added to all pages and posts
-
On my site, the “user-has-not-earned” class is added to all pages and posts regardless of whether it is a badge post or not. The only posts that do not have this class are badge posts that belong to a badge the user has earned.
Unfortunately, this causes styling unearned badges difficult as it causes for that styling to be applied to pretty much every page on my site. The theme I am using is probably getting this from the post_class filter that’s added in the content-filters.php file.
I believe this can be fixed by adding a third value (equaling ”) to be returned if the post ID is not that of a badge so as to prevent this behaviour.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘user-has-not-earned class added to all pages and posts’ is closed to new replies.