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 make an WordPress element sticky? [closed]
- Make custom page look exactly as homepage
- Best practice – pages – ACF or inline coding
- Set Title from Custom Template
- Child Theme with multiple css files
- How to hook up search results page to a back-end page?
- CSS Customizations for certain page
- Custom CSS at Appearance > Edit CSS is missing after update [closed]
- How To Load an HTML File As A WordPress Page (With No 301/No Redirect)
- Is there a way to by-pass the pagination function on one custom template?
- CSS Styling a specific page
- How to remove footer from just homepage
- 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]
- How to customize the WordPress 2014 theme, to have page using less horizontal margin?
- Editing a post template
- WordPress archive index page
- Add table to WordPress database
- Remove header title form page through CSS [closed]
- How to add custom ‘layout’ buttons to wordpress editor?
- How to create custom layouts and static pages in themes for clients
- Custom Content Page
- Centering one product on a single page [closed]
- Create a Page template selector page
- Creating custom page template
- How To Style Links in Content Area With Tag Automatically?
- Force WordPress to load a specific template
- Showing Meta Box via Jquery Checkbox
- Inline-Table under TwentyTwelve not working
- custom css and javascript not working on page defined as template?
- Dynamic Sidebars based on page name
- Translate custom template with WPML
- How To make Custom page of every Category
- Problem with custom function from jQuery slider tutorial
- WordPress menu: How to make www.link.com/#name never contain current_page_item class?
- 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?
- WordPress Sudden Loss of All CSS And Tons of JQuery Errors
- Custom CSS Nav Menu Style Not Being Applied
- custom email validation using javascript api with elementor pro and code snippets
- Style WooCommerce Product Search Widget
- Bootstrap slider not working
- Use Theme CSS in custom code
- How can I style the Comment Section of a blog post
- Conflict between Yoast SEO and my custom theme
- Hide entry-header for a specific category
- How do I make elements in mobile only reverse order?
- How to style bootstrap container in WordPress?
- WordPress core jquery version file not loaded?
- how to add custom html and css to wordpress
- How to add a template – so that i can choose a different menu for some pages
- How can I add category variable inside posts?
- How to have different background image based on post category
- Why does a custom php code inside a custom template not get executed?
- How replace theme styles?
- Perform javascript when an input in Customizer is selected/focused?
- wordpress custom posts page not showing
- Wrap WordPress Login Form in custom Div
- WordPress Customizer: Check for value of CSS selector and replace it
- Customize WP website specific column with CSS
- Execute function with jQuery if widget added or removed?
- How to use a custom playlist template:
- How do I change the content of an element for a theme without losing the styling?
- I can’t override CSS
- 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?
- Displaying Child Page’s Information
- Move text from the side of image to below image [closed]
- WordPress Inline Style missing
- Style Radio Buttons inside Edit Page (Custom Fields)
- Adding separate CSS files for separate pages with functions.php
- Use another theme template in my theme
- How to echo custom styles in css format?
- Background setting isn’t applied to entire sidebar height
- Redirect Every Instance of The Author Template Pages to Custom Author Pages
- 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
- Special characters showing in fallback font
- How to support extra color options for shortcodes?
- Template setting is not saving in wordpress
- Make Terms Under Custom Taxonomy Use Specific Single.php Template
- Custom single page based on which custom page template is selected
- Search results load individual post in slide out div
- Single page template