How to add a custom CSS class to ALL links
It would be more efficient to add a container with a certain class name around content that has been created with the HTML tab. That way you’re avoiding the code getting bulky.
It would be more efficient to add a container with a certain class name around content that has been created with the HTML tab. That way you’re avoiding the code getting bulky.
You can use the logged-in class added by body_class to target your CSS rules. .container { height: 160px } body.logged-in .container { height: 30px }
You could add following code (if not done already) in wp-config.php (please make a backup first of this file): define(‘WP_DEBUG’, true); define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_DISPLAY’, false ); This way debug is activated but the results (if have errors/notices) will not be shown but will be saved in a logfile which you can find … Read more
If you’re looking for a way to add the roles into the body class, like here: <body class=” … role-administrator role-jedi role-knight … “> then you could try the following: add_filter( ‘body_class’, function( $classes ) { if( is_user_logged_in() ) { $classes = array_merge( (array) $classes, array_map( function( $class ) { return ‘role-‘ . $class; // … Read more
There really is no foolproof method to detect a style sheet from other plugins or from a theme and then “switching them off”. You can only guess that other plugins and themes will be using the same handle as you to register the style sheet with. It is however much easier if your plugin is … Read more
There is no way to make a HTML markup out of the influence of some of the CSS loaded within the document; it is not a WordPress issue but how HTML/CSS works. The only thing you can do is to use very specific CSS selectors in your plugin: remember that the “C” in CSS means … Read more
The preferred way is to use add_action( ‘wp_enqueue_scripts’, ‘themeslug_enqueue_style’ ); within your child theme functions.php file or directly in your referral.php template page. Either way, it’s by using add_action and not by echoing into the <link> tag. Registering your style is also a recommended practice. The one benefit I would see in your case is … Read more
When a user is logged in, WordPress adds the class logged-in to the body tag, so you can target CSS differently for logged in users. body > footer { background: black; } body.logged-in > footer { background: red; } for example. This is only good for cosmetic changes though. Don’t try to use it to … Read more
The fault is from the following code, change the colors or remove it. .xoouserultra-wrap a.xoouserultra-button:hover, input[type=submit].xoouserultra-button:hover, input[type=submit].xoouserultra-button:focus, input[type=button].xoouserultra-button:hover, input[type=button].xoouserultra-button:focus, .xoouserultra-wrap a.xoouserultra-button:active, input[type=submit].xoouserultra-button:active, input[type=submit].xoouserultra-button:active, input[type=button].xoouserultra-button:active, input[type=button].xoouserultra-button:active { border: 1px solid #1278b2; background-color: #1278b2; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1278b2), to(#1391da)); background-image: -webkit-linear-gradient(top, #1278b2, #1391da); background-image: -moz-linear-gradient(top, #1278b2, #1391da); background-image: -ms-linear-gradient(top, #1278b2, #1391da); background-image: -o-linear-gradient(top, #1278b2, … Read more
You learned a valuable lesson: do not mess with the original theme files. Learn how to build a child theme and you will always be able to return to the original, working theme if any accidents happen. So, to answer your question ‘can someone take a look?’ – yes, someone probably could, but that would … Read more