Articles of stylesheet

Child theme style.css isn't overwriting parent style.css

I am using the Optimizer theme and created a child theme to make 2 changes in the style.css. The .single_wrap adjustment works fine, but the page_head is being ignored. When I use Inspect Element on Google Chrome I can tell the parent style.css overides the child style.css for this part. Page_head is the title banner […]

Is there a way to add additional CSS styles to the styles css file dynamically?

I would like to add additional styles to the styles.css file before it is sent to the client. Is this possible? Currently styles.css contains : /* Theme Name: My Theme Theme URI: https://example.com/themes/vanilla/ … */ … html { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; font-size: 62.5%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } // MY […]

Set a link in child theme style.css to jump to #main

I have created a 2013 child theme by creating these 2 files – /wp-content/themes/twentythirteen-child/style.css: @import url(“../twentythirteen/style.css”); .site-header .home-link { min-height: 800px; } /wp-content/themes/twentythirteen-child/functions.php: <?php function my_custom_header_setup() { $args = array(‘height’ => 800); add_theme_support(‘custom-header’, $args); } add_action(‘after_setup_theme’, ‘my_custom_header_setup’); ?> Now the website has a large image at the top and looks as I wanted it. However, […]

WP adds long version query strings to CSS and JS files

I noticed WP adding long query strings to my CSS and JS files. Not just the version parameter from wp_enqueue_style from a Theme or something, no something fishy going on. I even switched to the 2016 theme to be sure and even there: localhost/wp-content/themes/twentysixteen/genericons/genericons.css?ver=26a451f6ce396fe8c8b0ae0cf1b05446 localhost/wp-content/themes/twentysixteen/style.css?ver=26a451f6ce396fe8c8b0ae0cf1b05446 What is this and where does it come from? I […]

I want to include my style.css in function.php file?

I’m new to WordPress. I’m including my file using <link rel=’stylesheet’ href=”<?php bloginfo(“stylesheet_url”)?>”/> But if i enqueue my css file in functions.php it is not working. Why? Where is my mistake? <?php wp_enqueue_style(‘style’,get_template_directory_uri())?> What is the solution for this?

One Site. One Theme. Multiple Stylesheets without plugins?

Greeting Community, Here’s my challenge: We have an annual report that is published annually. We do NOT want to spin up a new site and domain each year, but house each previous year’s edition on the same site. The kicker is this — each year has a unique design but most of the site’s functionality […]

Add stylesheet per layout

Could anyone tell me what is the best and most efficient way to add separate style sheet only to one template? Do I have to have separate header and call it there or there is some WordPress trick?

WordPress fonts need to upload with Google fonts?

I tried to upload fonts in WordPress in wp-includes/fonts. Then I go in Apperance -> Editor -> Style.css and here I have something like this @font-face { font-family: helvetica_light; src: url(/wp-includes/fonts/helvetica_light.otf); }

How can I use PurifyCSS to clean WordPress style.css?

I am trying to use PurifyCSS to clean my style.css file. When I try it on static html file if works fine. See example of my CLI command: purifycss wp01/wp-content/themes/mytheme/style.css index.html –min –info But when I try to use it on live web (running on my localhost) I am getting incorrect results. Here is my […]

WordPress Child theme fails to override parent theme css

I’ve installed the Faxhion theme for a client, and I’ve successfully created a child theme. However I’m somehow not able to override the parent themes css. Similar questions such as this one & this one have been asked, I’ve followed the instructions on both, and I’ve managed to see that my child theme css is […]