function my_custom_enqueue_scripts() {
if ($handle = opendir(get_template_directory() . '/custom-stylesheets')) {
$i = 1;
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
wp_register_style('custom_stylesheets_' . $i, get_template_directory_uri() . '/custom-stylesheets/' . $file);
$i++;
}
}
closedir($handle);
}
}
add_action('wp_enqueue_scripts', 'my_custom_enqueue_scripts');
Add code to a file: functions.php
Styles should be located: you_theme/custom-stylesheets/
Related Posts:
- jQueryUI dialog width
- Slide right to left?
- jQuery UI Datepicker not working
- How do I link a JavaScript file to a HTML file?
- jQuery dialog popup
- JavaScript runtime error: ‘$’ is undefined
- JavaScript Loading Screen while page loads
- Force a default browser on my android phone using a simple html shortcut page
- Set selected option of select box
- Click button copy to clipboard
- How to make html table vertically scrollable
- How to make a simple image upload using Javascript/HTML
- How to make Bootstrap carousel slider use mobile left/right swipe
- How to Show External website inside another page without iFrame? [closed]
- bootstrap 3 navbar collapse button not working
- Display XML content in HTML page
- How to change the text of a button in jQuery?
- Bootstrap carousel not sliding
- Play/pause HTML 5 video using JQuery
- Clear form fields with jQuery
- How to use radio on change event?
- How to call a webservice method from an html page [javascript] with out refresh the page
- Form Submit jQuery does not work
- Javascript – ERR_CONTENT_LENGTH_MISMATCH
- Random background images CSS3
- Find out whether radio button is checked with JQuery?
- $(document).ready(function() is not working
- Show div #id on click with jQuery
- How do I remove a box-shadow effect from an element when another element is hovered?
- Check if user is logged in using JQuery
- How to save the state of a drag and drop jQuery UI Sortables front end layout editor?
- Custom function to rearrange attachments when creating posts – Almost there
- possible to make sections in theme customizer sortable and saveable at publish button clicked?
- Enqueuing jQuery in plug-ins
- How do I get my page to load the jQuery UI Effects library?
- Override default jquery ui library with newer version
- How to enable the content editor as a droppable target with jQuery-ui?
- Automatic jQuery accordion from header tags
- Jquery not showing in homepage
- Format numeric symbols in titles
- jQuery.accordion isn’t a function even when enqueued
- Override theme style with other CSS on a specific page
- Will the latest Bootstrap work properly with the default WordPress jQuery?
- Accordion scrolls page too low after clicking on the title [closed]
- Rhyzz Repeatable-fields javascript in php and wordpress
- WordPress + BlockUI or a splash page [closed]
- Return an array from get_terms and store as JavaScript array for search autocomplete
- WordPress Comments – Rich Text
- Dukapress jQuery(“form.product_update”).livequery is not a function [closed]
- Which jQuery packages are included in WordPress 3.1.2?
- Good Solution for Adding jQuery Tabs Anywhere Within WordPress?
- Cannot enqueue jQuery correctly using Google CDN
- Adding jQuery UI elements to WordPress page
- Adding a slide toggle on WordPress
- Sorting WP Auctions by date/price?
- How to add custon UI jquery & Fancybox script to WP
- jQuery tabs plugin with callback to fetch data
- Jquery UI Google CSS, from where?
- specifying relative file paths in WP with jQuery requests not working
- datepicker for custom post type admin
- How to keep HTML form field that is conditional hidden with javasript hidden after page reload?
- JQuery UI not loading without explicit loading of jQuery
- click event to unhide something after ajax not firing
- Is there a default way in wordpress to create a overlay in the dashboard?
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Recommended Use of Bootstrap, or JQuery-UI in WP/plugin development?
- Screen Options JavaScript Code
- Insert a Featured Video
- Drag and Drop Metadata Menu Order
- How to use JQuery Marquee in WordPress?
- A carousel slideshow plugin in JavaScript
- JQuery script working locally on desktop, not working on WordPress + Divi
- jQuery UI Accordion loading very slow
- Theme style overrides the plugin style
- Slide toggle Jquery UI
- Getting click on item to open closest relevant element (popup) with jQuery
- How can publish my bootstrap created table ( huge amount of data) on my word-press theme?
- jquery Autocomplete
- jQuery for Fade Preload Causes My Site Favicon to Disappear from Tab of Browser
- how to allow download after newsletter subscription?
- jQuery function not working in WordPress but works in jsfiddle
- why does so many javascript libraries are loaded along with my website?
- Dashboard controls have all stopped working
- Site images are fixed in front of my site content [closed]
- Sorting UL Listing Within the TinyMCE Visual Editor in WordPress
- change the icon of a custom post type in WordPress to use twitter boostrap
- jQuery dialog prints HTML-Tags under WordPress
- using jquery autocomplete in wordpress plugin
- can’t make jQuery work (change image on time interval) [closed]
- Theme variation conflict with jquery select2 dropdown
- Contact Form 7 – Submit Form not working After Ajax Request [closed]
- jQuery datepicker not showing on admin menu
- jQuery: How can I create a simple overlay?
- Error when posting comment form: The error is TypeError: e[h] is not a function
- Need to change url paramenter of share product pintrest [closed]
- Using Javascript to detect keypress event in text editor
- Adding JS to one page
- Display posts from another site using REST API in an asynchronous manner
- jQuery forms & updating info
- search in jquery mobile returns blank page