Master Prons
Master Prons

Reputation: 7

why my stylesheet is not applying my style which I code newly even when it is included properly in wordpress

I am making wordpress design and have included it using wp_register_style and wp_enqueue_style functions. The codes in function.php are as bellow:

function themeSetup (){

    wp_register_style( 'prostyle', get_template_directory_uri() .'/common/prostyle.css', array(), null, 'all' );
    wp_enqueue_style( 'prostyle' );

    wp_register_style( 'style', get_stylesheet_uri(), array(), null, 'all' );
    wp_enqueue_style( 'style' );

    wp_register_script( 'JqueryCDN', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js', '', null, false );
    wp_enqueue_script( 'JqueryCDN' );

    wp_register_script( 'proscript', get_template_directory_uri() .'/common/proscript.js', '', null, false, false );
    wp_enqueue_script( 'proscript' );


}

add_action('wp_enqueue_scripts', 'themeSetup');

Main Problem: My previously written css is working on the site but each new css rule in same file which is included are neither showing on browser nor it is applying to elements.

Plz, kindly tell me what I am missing in such codes. If there is anywhere wrong in wp_register_script or style function please tell me.

Upvotes: 0

Views: 37

Answers (1)

Vasim Shaikh
Vasim Shaikh

Reputation: 4542

Step 1 : Always use Private window or incognito mode in case of chrome.

Step 2 : disable your cache plugin if any.

Step 3: attach version in your style that force server to use newer version.

Step 4: Cloud flare is not taking your css as a newer version.

Upvotes: 1

Related Questions