Currently diving into the world of Wordpress development and creating my own theme. Utilizing bootstrap along with some custom CSS, but having trouble getting everything to work together in harmony.
Below is a snippet of my functions code:
<?php
function smartwp_remove_wp_block_library_css(){
wp_dequeue_style( 'wp-block-library' );
wp_dequeue_style( 'wp-block-library-theme' );
wp_dequeue_style( 'wc-block-style' ); // Removing WooCommerce block CSS stylesheet
}
add_action( 'wp_enqueue_scripts', 'smartwp_remove_wp_block_library_css', 100 );
function load_stylesheets() {
wp_register_style('bootstrap',get_template_directory_uri() . '/css/bootstrap.min.css',
array(),false,'all');
wp_enqueue_style('bootstrap');
wp_register_style('style',get_template_directory_uri() . '/style.css',
array(),false,'all');
wp_enqueue_style('style');
}
add_action('wp_enqueue_scripts', 'load_stylesheets');
function loadjs() {
wp_register_script('customjs',get_template_directory_uri() . '/js/scripts.js','',true);
wp_enqueue_script( 'customjs');
}
add_action('wp_enqueue_scripts','loadjs');
I even attempted some code found online to disable Guttenberg css, unfortunately, with no success. Checking the console, I can confirm that my style.css is being included and bootstrap is functioning correctly.
Below is a snippet of my current CSS styles:
/*
Theme name:
Author:
*/
body {
background: "#ff03ab";
}
Can't seem to figure out what's going wrong, could it be typos lurking around somewhere? I've also tried clearing browser history and experimenting with different CSS properties in my style.css file.