My attempt to integrate my CSS and JS files with WordPress has not been successful. Although my CSS works through the Custom CSS tab, this is not an ideal solution. Below is the code from my functions.php file for your reference. Can you help me troubleshoot this issue?
Here is my PHP Code...
<?php
function custom_script_enqueue() {
wp_enqueue_style( "custom-style", get_template_directory_uri() . "/css/custom.css", array(), "1.0.0", "all" );
wp_enqueue_script( "custom-script", get_template_directory_uri() . "/js/custom.js", array(), "1.0.0", true );
};
add_action( "wp_enqueue_scripts", "custom_script_enqueue" );
function custom_theme_setup() {
add_theme_support("menus");
register_nav_menu("primary", "Primary Navigation");
register_nav_menu("secondary", "Secondary Navigation");
}
add_action("init", "custom_theme_setup");
add_theme_support("custom-background");
add_theme_support("custom-header");
function custom_widget_setup() {
register_sidebar(
array(
"name" => "Sidebar",
"id" => "custom-sidebar-1",
"class" => "custom-widget",
"description" => "Custom Sidebar",
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
)
);
}
add_action("widgets_init","custom_widget_setup");
?>