How about having the location of the CSS file set as an option for the plugin in the admin area?
The default setting would be your default stylesheet. The option would allow this to be changed to another specific stylesheet by the user, or removed entirely.
If this option exists, your plugin enqueues the stylesheet.
This allows the user to:
- replace default stylesheet with their own, in any location
- not use stylesheets in the plugin at all and apply them from a stylesheet elsewhere
- change stylesheets by de-queueing the plugin’s and queuing their own
I think I’ve seen this in a plugin but I can’t remember which!
Related Posts:
- How do I add CSS options to my plugin without using inline styles?
- Is it ever okay to include inline CSS in plugins?
- How to add sub-menu to a menu generated by wp_nav_menu by using plugin
- How to prevent loading of all plugin’s resources?
- What is the best way to provide plugin users with a way to customized the styles
- What is better way to use Bootstrap inside admin panel?
- wp_enqueue_style built in styles
- Backslashes being stripped from CSS
- Dequeue theme stylesheets but keep widget styling on custom page template
- How to check if a stylesheet is already loaded?
- how to include javascript file and css file in wordpress
- How can I add a CSS rule to edit.php?
- Remove Internal Style Sheet if no Value Provided?
- How do I include background images in my stylesheets in a plugin?
- What parameter should I pass to wp_enqueue_style to depend on the themes stylesheet?
- Is there no admin ui guide for 4.x?
- Correct check for any admin page with editor
- How to remove default style of header in wordpress metabox
- CSS not affecting widget output
- How can I avoid conflicts between plugin and theme?
- Plugin Development/ Stop CSS clashes.
- Can’t change the style of a submit input type? [closed]
- Make a plugin page out of influence of the theme’s style
- Distributing Frontend Assets with Plugins
- My stylesheets are not enqueuing
- Custom Plugin – CSS works, JS doesn’t
- Are there any official or unofficial guidelines for the styling of a widget?
- Proper way to include stylesheet for panels
- Apply styles to blockquote element with the WYSIWYG editor
- Styles don’t load correctly. Insecure content
- Completely isolate a plugin view so it doesn’t load the theme
- Does WordPress default CSS have Grids?
- How to insert HTML/CSS/JS into my iframe plugin?
- How To Protect Plugin Display From Being Affected By Theme’s CSS
- Load stylesheet in edit category page?
- CSS not being applied using wp_enqueue_style
- WordPress Plugin Authoring question about jquery and css
- How to add some basic inline CSS using existing plugin or theme?
- Why my theme’s css not working on another site
- WordPress plugin development theme issue
- Why does theme’s reset CSS have higher precedence of plugin’s CSS?
- Twenty-seventy theme remove additional CSS from head
- How to customize the size of Featured Images or Post Thumbnails in WordPress?
- Publish, Save Draft and Preview buttons do not work after being moved with jQuery
- Unable to link CSS file
- How can I add the Post ID to Class Name in Jquery?
- Best practice to include custom user styles in widgets
- How to create A – Z List with pictures?
- how to add contact form 7 shortcode in javascript variable
- How to post data to same page in wordpress
- How to edit the properties of a page programmatically?
- Plugin development, hooks, generate content
- Add a reset button to the options page (using Settings API)?
- How to Display Custom Post Type’s Gallery (images ) in Through WP_Query
- How to alter the order of custom form fields
- Help with callback using do_action_ref_array
- Gutenberg: useDispatch is not a function – @wordpress/data included
- How to get orders with used coupon in WooCommerce
- Why not to include reference to /wp-admin/admin.php in Plugin
- How to Debug: My Plugin Interferes With My Theme
- How to stop activation addon if the main plugin is not activated
- How do I change the image from the default mysteryman in the WP Profile page
- WordPress: How to rename the main php plugin base file?
- Is there any way to hide page from dashboard (all pages list) OR navbar from plugin function?
- Showing results from json-string in WordPress search results page
- How to revive (or take over) a plugin?
- Make visible page only in the trash
- Reading plugin settings in esnext wordpress block
- Plugin frontend page design irrespective of the theme used
- add_meta_box does not display meta box in Admin
- How to store in the database directly the translation?
- What is the “best” way to update a theme via a plugin?
- Is there a an option to modify the post content directly on the browser instead of having it reflected on browser by modifying in the database?
- Acessing WP functions in form submission handler
- Can a standalone app be made to work as a WordPress plugin?
- Create and style menu
- wp_delete_post returning WordPress database error unknown column 0
- Force remove parent theme CSS/JS and call them from Child theme
- Checking if the query is empty does not work
- Remove default wordpress roles
- What is the meta_query key name for the woo product average rating? [closed]
- how to catch a data from a array in WordPress
- get the queried_object of an url
- Advanced Custom Fields conflicting with custom plugin when saving custom field
- Need someone to help you want to manage points for members to code interface functions? thank you
- Call API on post save/update and show the result in admin area
- Is there any other ways to replicating changes on live from staging without pushing from git
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?
- External api call using wordpress
- Set link dialog to open in blank by default
- plugabble wp_authenticate function not works from wp-login.php
- How to get recent one post from each category on home page?
- WordPress plugin boilerplate AJAX functionality
- Run different permission_callback depending on HTTP method of custom REST API endpoint
- upload image to wordpress media library failed for custom post type
- Fetch Custom Woocomerce filed data and check the data avialble in Wp-user table as nicname or username using function.php
- How to get locale within WP REST Request?
- How to add extra EXIF data when images are uploaded?
- How to boost WP custom post REST API GET queries by custom taxonomies
- I want to redirect user to an amazon product page from my wordpress website when they add product to there cart [closed]