How to Solve Style.css problem when not working in Custom WordPress Theme.

style.css

This is a file in wordpress theme, in which the theme can be made beautiful by doing css coding.

How To

When the style.css file does not work in your custom theme, then you can fix that problem by following some steps –

1-function.php
Paste the below code in your theme’s function.php

//Enqueue The css
function thekroyaard_wp_style() {
wp_enqueue_style('TkSPL',get_template_directory_uri().'/style.css',
array(), '1.0.0','all');
}

add_action('wp_enqueue_scripts','thekroyaard_wp_style');

try this another code may be this code will work on your theme

 /**
* Load CSS
*/
function thekroyaard_spl() {
wp_enqueue_style( 'style', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'thekroyaard_spl' );

2-header.php
Now you go to header.php and paste the code below in the head section –

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"
type="text/css" media="screen" />
<link ref="stylesheet" href="style.css"/>

In this way you can make the style.css file workable. Comment if you have any other problem.