BLOG

“I still suggest you call
this page 42Lab.
Works for both of us!”
- Joey

WordPress 101: Tips, Tricks & Hacks

One of the biggest reasons why WordPress is so popular with the website development community is due to its modularity. WordPress, out of all the Content Management Systems in the market today, supports the highest number of website themes. That is not all, as pretty much all these themes are highly customizable and easy to use. 

Now you as a website owner can create your website out of the hundreds of suitable WordPress themes. A question arises, how do I customize my theme to my individual needs? How do I add custom CSS sheets to my WordPress theme? How do I make my WordPress website look exactly the way I want it to look like? 

How To Add Customized CSS File? 

Trust us when we say this, you are not the first person to be plagued by such questions. Therefore we have prepared a hack that is meant to help not only you, but the countless others who seek the same answer. 

The following steps detail the WordPress hack on how you can add custom CSS files to your theme: 

Step 1 – Add & Create a special CSS file and name it custom.css

Step 2 – Add the following code to your CSS functions file:

function custom_style_sheet() {

wp_enqueue_style( 'custom-styling', get_stylesheet_directory_uri() . '/custom.css' );

}

add_action('wp_enqueue_scripts', 'custom_style_sheet');

Step 3 – Remember to keep the newly uploaded CSS file on the same directory as the main CSS file

42 works

Why do Market Leaders rely on Social Listening?

Read Blog

42Works announces COVID-19 relief measures for all its team members

Read Policy
42 works
Get 42Works Blog updates in your Inbox!

    Washington United States 207.46.13.181 https://42works.net/add-customized-css-file-in-wordpress/