• convert html template to wordpress i use ‘functions.php’ to call css . here is the code of ‘functions.php’- that i used

    <?php
    function my_function_name(){

    wp_register_style(‘bootstrap’,
    get_template_directory_uri() .’/css/bootstrap.min.css’,
    array(),’3.1.0′,’all’
    );
    wp_enqueue_style(‘bootstrap’);

    }
    add_action(‘ wp_enqueue_scripts’,’my_function_name’);

    ?>

    but css didnot call at wordpress. is there anything add at index.php for css stylesheet ?

Viewing 1 replies (of 1 total)
  • It’s the space in the add_action() line. It should be

    add_action('wp_enqueue_scripts','my_function_name');

    Notice the lack of space between the single quote and the wp_enqueue_scripts.

Viewing 1 replies (of 1 total)
  • The topic ‘add css problem’ is closed to new replies.