I have set up a template on my Wordpress.org website that will apply some .css code to hide the header, footer and breadcrumbs on my landing pages.

I've created a css folder in my child theme, created a .css file with the code below and works perfectly with the function under the code:

 #header-wrap, #navi-wrap.site-header, #footer-wrap, #footer.clearfix, #sidebar.secondary.clearfix, #breadcrumbs, .page-title {

Function in my child theme:

function wpse_enqueue_page_template_styles() {
    if ( is_page_template( 'template-fullwidth.php' ) ) {
        wp_enqueue_style( 'page-template', get_stylesheet_directory_uri() . '/css/landing-page.css' );
add_action( 'wp_enqueue_scripts', 'wpse_enqueue_page_template_styles' );

I have another .css code though, that changes the link colour from the website default Blue to White, in my Theme customizer - Adidtional CSS and it works, but I would like to include it in my .css file, so I don't have to apply it to every page separately:

.page-id-2934 a.wp-block-button__link.has-white-color.has-text-color.has-background.no-border-radius{

Problem is, when I add this code as it is (without the page id, obviously) in my existing .css file, an exclamation mark shows up on the left and when I hover it tells me to not use adjoining clases, that a,wp... it's Overqualified and I should use only .wp-block-button__link without element name and I don't know what that means. When I leave only .wp-block-button__link {color:white;} it's not working.

I also have some pages with different buttons and the code that works in the Additional CSS is

.page-id-3547 a.uagb-buttons-repeater {

...But when I put that in the .css file I get the same message: with a... is overqualified and when I leave just .uagb-buttons-repeater {color:white;} it doesn't work.

I've also created a separate .css file:

a.uagb-buttons-repeater {
    color: white;

...But when I created a similar function as the one for hiding the header and footer, it still doesn't work.

So, long story short, I would like to add the white link .css code in the .css file, so that my landing pages button links are white instead of blue on pages with Fullwidth template and I was hoping to add both codes, so that it works with both button types. Alternatively, I could just use the second button type (a.uag...) and change it on the existing pages. Any help would be appreciated.


  • Where are you editing this CSS file? It seems like your editor is offering suggestions. That doesn't really have anything to do with WordPress, and is more of a generic CSS question, or a question about your editor. Either way it's better suited to stackoverflow.com. – Jacob Peattie Mar 17 at 11:45
  • @Jacob Peattie thanks, but I posted this first on stackoverflow.com and I was directed here. It looks like nobody can help, but I only get advice to post the question elsewhere... – Sorin Pascu Mar 18 at 23:23
  • The WordPress-specific stuff at the beginning, regarding wp_enqueue_style() etc. probably threw them. Ultimately that's not relevant to your issue. I suggest just posting it starting at "Problem is, when I add this code...". – Jacob Peattie Mar 18 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.