this syntax doesn’t seem right to me.
First of all what is ABS_URL
? If it’s a constant that you’ve defined earlier, then there is an '
missing before /includes/box.css'
. The code should look like this:
$name="mystyle";
wp_enqueue_style( $name .'-style', ABS_URL . '/includes/box.css', false );
It works as it should, the output is: <link rel="stylesheet" id='mystyle-style-css' href="https://wordpress.stackexchange.com/questions/284788/whatever-there-is-in-ABS_URL-constant" type="text/css" media="all" />
Also, make sure if you need to define this constant at all – if you want to load stylesheet from your theme’s folder or its subfolders, use get_stylesheet_directory_uri()
function:
$name="mystyle";
wp_enqueue_style( $name .'-style', esc_url( get_stylesheet_directory_uri() ) . '/includes/box.css' , false );
Related Posts:
- Load CSS before Theme CSS
- How to export comments in WordPress?
- How can I call a function from one plugin within another plugin?
- Gutenberg disallow certain custom blocks but keep all core blocks?
- How do I force wp_enqueue_scripts to load at the END of ?
- Remote upload file to server B
- Publish author posts only with editor approval?
- Using functions from a plugin in your theme
- Keep one user logged for a year?
- Customizing subject in comment notification e-mails
- WP showing “warning: call_user_func_array()”, What to do?
- How can I dequeue a Plugin Stylesheet?
- Declare a function before plugin does on the theme functions.php file
- Generate Advanced Custom Fields box in custom admin menu page
- How to turn off email you receive when registered?
- Removing user contact methods works from functions.php but not from a plugin
- Execute a function using ajax
- Use functionality of 2 wordpress plugins
- How can I enqueue a style only when a particular widget is active?
- How can i change an image’s author?
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Showing Co-Authors on post page
- jQuery Plugin to use WordPress functions in AJAX request
- How to enqueue a theme style-sheet to my admin settings page?
- Debugging Technique Question re: functions.php
- WP Job Manager Category Drop-down; Change Placeholder Text Via Filter
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- How to include code into functions.php file via a plugin
- Custom Taxonomy Tag Search
- Is it possible to enqueue CSS files from plugin before theme’s CSS files?
- Redeclare theme’s function in a plugin
- I have functions in my wordpress plugin. How do I get them to work for me?
- Change wordpress current_time function to different timezone
- How to override a plugin function wrapped in a class?
- Edit Yoast SEO breadcrumbs output [closed]
- Snippets: is it better to add them in functions.php or make site-specific plugins?
- Using a post-signup hook to get user details
- Restrict media upload size by format
- Calling plugin function inside custom plugin for onclick event
- Facebook Messager Plugin
- Adding Font Awesome to WP Plugin
- Plugin is a widget, but I want to call it in the head, can I?
- Cannot get wpdb data (Error in a simple fuction) [closed]
- Basics of changing plugin output
- Why can’t I call a (member) function from within a foreach?
- Are there action hooks for comments?
- Help with WP Business Directory Manager Plugin?
- Shortcode Attributes to Return different $_POST
- Plugin onclick button activate other plugin
- Loading a plugin’s js file from functions.php
- Activate and deactivate plugin automatically
- Custom plugin – load enqueue only for this plugin
- Change Header (Logo) Based on Login
- How to access OOP plugin function inside themes or other plugin
- Different registration form for different roles
- How can i list random author?
- Can you echo PHP code from a variable?
- Elementor Pro display featured image on section -> style -> image using shortcode
- How to get custom minimum price in Woocommerce
- Edit all $wp_scripts at once to $in_footer = false
- Create a pdf from the entries in DB
- how to validate input field in wordpress generated with wpform plugin
- RSS feeds for specific topics
- add_rewrite_rule to load different page, without changing URL in browser
- Overriding a function in a WordPress plugin
- The function called on the wp head hook becomes null
- Submitting form to PHP
- Adding discount functionality to the cart
- Precheck fields when I add a new post
- Get Shortcode output to database for static post_content
- Use buddypress function outside of plugin
- How use get_plugin_updates() function?
- how override a define
- WPML – Hook when language is switched (change user language)
- Use action, filter, or hook to append HTML to WordPress plugin function
- Change custom rewrite rule when permalink is updated/changed
- How to disable/enable a plugin at a specific time
- Save Post Permalink In .txt File
- How To Add Code To WP Without Plugin or Functions
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- How to delete posts older than one year with post meta, post attachments and files?
- Disqus comments count taking long to update
- plugin not hooking to my custom hook
- Populate select option with JSON file
- Home page letters
- Find all strings between an enclosing shortcode
- Load wordpress enviroment for external content?
- How to structure plugin in to functions?
- Trying to output a “Most visited blogs” list in wordpress multisite
- How to disable register and reset the password from WordPress admin panel?
- wordpress Search function is not working
- What is wrong with this dbDelta syntax?
- Call a function with href
- PHP Creating a formula from mysql db values and db stored math operator
- How to Allow Users to Select Recipients In a WordPress Comment section?
- How often should I execute add_filter and function declaration in Code Snippets?
- Product customizing quiz – quiz adding products to the cart
- How to change all the urls of the WordPress site?
- Event Made Easy – Block registration to two or more events that have the same category
- I want to allow certain file types on dokan upload files