• Hello i’m having a problem linking stylesheet in to wordpress theme i try 5 8 time but its not working ? i’m using MAMP and i also try on wamp? on windows 7 i’m not geting any error in browser and i check with inspect element its not loading the stylesheet file

    <?php
    function mytheme_enqueue_style() {

    wp_enqueue_style( ‘Style_sheet’, get_stylesheet_directory_uri() . ‘/custom.css’ ) );
    }
    add_action( ‘wp_enqueue_scripts’, ‘mytheme_enqueue_style’ );
    ?>

    i upload all file in github pls check https://github.com/chouhan50/theme/tree/master

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try to use this script, you have added extra “)” at end.

    function mytheme_enqueue_style() {

    wp_enqueue_style( ‘Style_sheet’, get_stylesheet_directory_uri() . ‘/custom.css’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘mytheme_enqueue_style’ );

    Thread Starter chouhan50

    (@chouhan50)

    I tried still not working

    function mytheme_enqueue_style() {

    wp_enqueue_style( ‘Style_sheet’, get_stylesheet_directory_uri() . ‘/custom.css’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘mytheme_enqueue_style’ );

    ?>
    And i upload the file on online server but same problem

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress not linking css files and js files’ is closed to new replies.