In my theme functions.php at the end works for me:
function themesCharles_enqueue_style() {
wp_enqueue_style( 'my-theme', get_template_directory_uri() .'/myFiles/myStyle.css', false );
}
function themesCharles_enqueue_script() {
wp_enqueue_script( 'my-js', get_template_directory_uri() .'/myFiles/myScript.js', false );
}
add_action( 'wp_enqueue_scripts', 'themesCharles_enqueue_style' );
add_action( 'wp_enqueue_scripts', 'themesCharles_enqueue_script' );
Related Posts:
- How to customize the default HTML for WordPress Attachments
- Is it possible to change the attributes of a registered style or script before it fires?
- Understrap child theme JS not working in custom-javascript.js file
- why won’t my custom css load with the enqueue method or any other method?
- How can I delete the word `Category:` from page titles? [duplicate]
- How do I target this page specifically?
- Getting a jQuery library to work in WordPress & Avada
- How to add a new product type on woocommerce product types? [closed]
- How to include own css on wordpress tinymce editor?
- Updating WordPress overwriting customization tweaks – strategies?
- wp_trim_words() does not trim the_content() in WordPress
- Best approach for loading a sidebar Only if the screen max-width is >900px?
- page_template toggle between 2 templates + 2 permalinks for same post
- Make page template that is just an “include” of another?
- How to get WordPress to accept the tag in articles (or other alternatives)
- WordPress Template not affecting the working, keeps defaulting to the index.php template
- How to remove padding and margin between divi rows? [closed]
- How to display post title & excerpt when mouse hovers on an image?
- Cannot figure out how to center div in WordPress theme [closed]
- how can I change the background color of all posts on my server?
- Remove template drop down for certain pages
- CSS to remove “comments count” icon from main page [closed]
- how to add custom css and js on wordpress post editor directly without using .php file
- How to customize core admin pages within a theme?
- How can I make site-wide content editable, for example footer content
- Using Fullscreenr with a wordpress blog – weird bug
- Remove WordPress scripts
- window resizing problem
- Showcase elementor templates
- How to make an WordPress element sticky? [closed]
- Make custom page look exactly as homepage
- Set Title from Custom Template
- Child Theme with multiple css files
- CSS Customizations for certain page
- Custom CSS at Appearance > Edit CSS is missing after update [closed]
- Why the css in twenteenfourteen-child theme take no effect?
- How to format text of site subtitle
- how to add custom logo to my template
- WordPress noob, assign custom stylesheet using @import or if? Didn’t work for me
- str_replace inside specific css files [closed]
- Good way to customize admin CSS?
- css media query question [closed]
- Editing a post template
- WordPress archive index page
- Add table to WordPress database
- Remove header title form page through CSS [closed]
- How to create custom layouts and static pages in themes for clients
- Custom Content Page
- Create a Page template selector page
- How To Style Links in Content Area With Tag Automatically?
- Force WordPress to load a specific template
- Inline-Table under TwentyTwelve not working
- custom css and javascript not working on page defined as template?
- Dynamic Sidebars based on page name
- wp_enqueue_script JS code runs too late (after user begins interacting)
- How to add Custom Css within the Editor?
- Will WordPress updates remove Gutenberg Additional Classes?
- Bootstrap slider not working
- How can I style the Comment Section of a blog post
- Conflict between Yoast SEO and my custom theme
- How do I make elements in mobile only reverse order?
- WordPress core jquery version file not loaded?
- How to add a template – so that i can choose a different menu for some pages
- How to have different background image based on post category
- Perform javascript when an input in Customizer is selected/focused?
- WordPress Customizer: Check for value of CSS selector and replace it
- Customize WP website specific column with CSS
- How to use a custom playlist template:
- How to submit form data in the same page in WordPress without reloading the page?
- Two color in one Heading
- Still desperate about multiple TinyMCEs in widgets – is there any good solution to this yet?
- WordPress Inline Style missing
- Style Radio Buttons inside Edit Page (Custom Fields)
- How to echo custom styles in css format?
- Background setting isn’t applied to entire sidebar height
- Allow arbitrary text after page URL
- Taxonomy template by post type
- Customizing the built-in Media Playlist
- Best way to create a page outside of the pages list
- Template setting is not saving in wordpress
- Custom single page based on which custom page template is selected
- Single page template
- why jquery is not loading in wordpress page?
- Will too many overridden css rules lead to performance issues
- Complete Custom Style Part of Site
- add custom css on all page exept of one
- Custom template not working for existing pages [closed]
- Edit image alignment in WordPress twentysixteen child theme on attachment page [closed]
- How customizable is a self-hosted WordPress blog compared to a Blogger blog?
- adding new html css to wordpress section from codepen [closed]
- use another theme for just one page
- Instead of Custom CSS Theme CSS is loading
- Prevent posts from being published if the ‘Uncategorized’-category or no category is selected
- Particle.js not loading in WordPress Gutenberg
- Cannot add custom css in site
- Custom CSS working on home page but not on NEW created PAGE
- Post interior margin in twenty eleven theme
- Disable all Fonts that are Standard in WordPress and replacing them with a custom Font?
- Modifying posts based on category in TwentyTwentyTwo theme
- Where did I put this one line of css?