Jemuel Elimanco Jemuel Elimanco - 1 month ago 14
PHP Question

add_action() function in wordpress not working

I am new in Wordpress and I am writing this code in my

functions.php
but it isn't working. This is my code:

<?php

function myFunction(){
wp_enqueue_style('style',get_stylesheet_uri());
}
add_action('wp_enqueue_scripts','myFunction');


This function must add my style.css in my page but is not working.

Answer

Add in header file

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