Started this blog using the Lifestyle Pro Theme, and then used CSS to make it look how I wanted. WordPress does come with a Edit CSS section for you to enter your CSS, or you can create your own CSS file that you attach.
Creating your own CSS file just gives you more flexibility. When I started I used the Edit CSS section, but have found the custom file has worked better for me. Adding the Custom CSS was really super easy just had to add a little bit of code (Please don’t be scared).
Custom CSS for WordPress – The Code
Just add this code to your functions.php, and replace the highlighted section with the the location of where you saved your file.
*Disclaimor* I am using a self-hosted WordPress Site with a Genesis Theme
/** Load Custom CSS File */
add_action( 'wp_enqueue_scripts', 'maj_load_custom_css' );
function maj_load_custom_css() {
wp_enqueue_style(
'custom-css',
CHILD_URL . '/lewislanestyle.css',
array(),
PARENT_THEME_VERSION
)
}
After adding the code you should now see your custom file in WordPress.
This code I found after doing some searching, and sorry I can’t remember where. See pretty easy, and painless to do.
Feel free to drop me any questions you might have or feedback if you used it below in the comments section.
Any customization you would like to know how to do?.
Fill out the Tutorial Request Form if you have something you would like to see in a future tutorial.
Leave a Reply