Yes, This is the correct way.
Many of us use styles to alter the look of our website, and scripts to enhance functionality. It is important to note however, that the way you add these scripts to WordPress is just as important as the content of these files. Instead of plopping them into the header or footer file we need to use WordPress enqueue functionality.
Take a look at the WordPress Codex for a list of included scripts OR direct to point Function Reference/wp enqueue style.
Let me know if you face any query/concern regarding this.
Related Posts:
- Delete WordPress plugin Repository
- List all sidebar names?
- Add rewrite rule to permalink structure
- Load plugin selectively for pages or posts, etc
- Multiple plugins vs combined one
- Handling jQuery Component Collision
- Using add_filter inside another class
- SESSION in WordPress Plugin Development
- Finding WordPress sites using my plugins
- WordPress plugin installation error
- How long does it take for a new plugin to be approved?
- WordPress Plugin as ‘Library’ From Abstract Application?
- Good tools for locating hooks in a wordpress page/admin interface/blog post?
- WordPress 4.0 Cookie Authentication to avoid nonce error when publishing a post and page
- Detecting when a custom taxonomy has been changed and display alert?
- How to Build a Movie Library in WordPress 3.x
- How to prevent action in ajax request, when in admin side?
- How can I get full attachment url from wp_get_attachment_metadata?
- How to make my plugin GDPR compatible?
- Why is the Settings API is not saving my array of options
- Override comments.php template with plugin
- Custom plugins/Manipulated plugins: Always a terrible idea to inherit these types of WP sites that discourage updates? [closed]
- Accessing GET variable named ‘error’
- Why is an action callback function from an instance of a class always invoking the same function from an instance?
- Demystifying and understanding shortcode nomenclature
- download_url() appears as grey icons
- Plugin not appearing after uploading it via FTP
- How can I add an options page for my class based plugin?
- Sending WP posts to external API
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- Issue with adding count to “subsubsub” aka quick links on custom_post_type
- Register Page Template from Plugin
- Private Plugin Updates – Localhost
- Any hook for pre-plugin-update -either bulk or single plugin update
- wp_create_nonce function doesn’t work inside a plugin?
- Making a plugin only available on the front-end for the logged in super admin
- When to load auto-login code?
- CSV file generation failing
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- Prevent duplicate records in plugin table
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- Get Time Taken By Each Action Hook in WordPress
- How to replace WordPress Media Upload Window with user’s device window?
- Buidling a translate plugin for wordpress
- How to delete custom taxonomy terms in plugin’s uninstall.php?
- How can i change the texts of plugin (created by me) in wordpress admin?
- Setup wp_schedule_event within a custom plugin
- WordPress : Explain Plugins & Theme string value in database
- modify plugin to support RTL
- Prevent direct access to WordPress plugin assets?
- Can I use register_settings and unregister_setting once the settings page has loaded?
- Bulk update wordpress posts
- How to automatically add edit link on frontpage post of any wordpress theme?
- Plugin function inside custom plugin
- plugins_url() works everywhere but wp_reqister_script()
- Is there a plugin for automatically adding a word or symbol after a trigger word? I.e. Like a search and replace but more like search and add? [closed]
- Integrating boxtal PHP library into a custom WordPress Plugin
- Sanitize $_GET variable when comparing
- Where can I save plugin data?
- show my own admin_notices after a post has been published
- Class or function wrapper for plugin code
- How to use add_action for multiple instances of the same class
- Plugin option default value
- How can i listing current category and Featured Category post list?
- Ajax request sends url rather than data
- How to displaying Custom image, text and default image logo from Redux Framework option panel
- Grouping imported products and showing variations based on selected product
- save_post_product action not firing
- How to get the custom field value using SQL query
- specific rows style for in custom list table using WP_List_Table
- How to add the search page link to the anchor tag?
- Need to know if my approach to designing a geneaology plug-in for wordpress makes sense
- How to display the category name in the tab and post inside the tab in WordPress?
- How would I Redirect an existing WooCommerce customer to a specific url after Checkout
- Has blocks gutenberg block multiples registers type in my Plugin
- Ultimate Members Default Post Layout problem
- best way to upload a large file to wordpress using wp all import
- Why do actions with class and public method don’t fire __construct()
- Creating one user access account for all the multiple sites
- How to define the slug for my custom plugin?
- Custom plugin settings page with tab. Error: “Sorry, you are not allowed to access this page.”
- return bbp_get_topic_author_id as integer
- I am Getting Sorry, no posts matched your criteria on form submit only for certain page [duplicate]
- Dynamic input fields in WordPress Plugin
- Custom role not listed
- Is it possible to create duplicate post on other site (either push, on publish, or pull, periodically)?
- How to add a box note in wordpress plugin page ? top header side.
- Widget outputs the value but doesn’t save anything inside the textarea
- WordPress Widget: Is it possible to make the form dynamic without updating?
- Why some plugins are including wp-includes/plugin.php file?
- Change default url to plugin custom post type
- Saving an array to get_options
- show Visual form builder in the front end
- Plugin – including external javascript calling google maps
- Help me with my first very basic plugin
- wordpress plugin | short code issue
- HTML link within my plugin settings page
- How to create post comparison in wordpress
- How can I create a navigation menu in the sidebar that can also act like a slider?
- How to create a sharing marketplace with wordpress for bicycles?