Do I enqueue php files?
-
I’m trying to properly add scripts and styles to my theme through enqueue of the style and scripts. The guide I’m mentioning have just these lines of code:
function startwordpress_scripts() { wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '4.0.0' ); wp_enqueue_style( 'blog', get_template_directory_uri() . '/css/blog.css' ); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '4.0.0', true ); }This is linking to the bootstrap template and blog.css in folder within the root. However, don’t I have to make separate enqueue styles for the other .php files like the Index, Header, Footer? If not, do I make all edits within the blog.css if I want to change the appearance of my site? When should I add the code to the php files compared to the css file?
Thank you.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Do I enqueue php files?’ is closed to new replies.