To solve this problem, we must use plugin_dir_url
command.
For example:
<?php
wp_register_style( 'foo-styles', plugin_dir_url( __FILE__ ) . 'dahili/bootstrap.min.css' );
wp_enqueue_style( 'foo-styles' );
?>
Related Posts:
- How to get the path to the current theme?
- Get a path to a different plugin
- Symbolic Links on dev box with plugins and stylesheets
- Plugin base URL
- Use WP_Theme::scandir function to scan a plugin directory. Is there a way?
- How to use relative path with my plugins folders?
- Is there any way to allow a plugin to write over a previous version?
- How to get path or root of plugin folder, not file or dir?
- How to get post image root URL?
- Loading Images from Javascript on the Front End
- I’m including a html file in my plugin, but it can’t find its css or js files
- Plugin SVN folder structure
- Register additional wp plugin directory
- wp_enqueue_script() with unknown path and maybe symlink
- How to modify the uploads directory for wp.media.frame assigning an subfolder name
- Overriding the template files using a plugin for all themes
- Nested Hooks with do_action for performance reasons – safe/necessary?
- WordPress custom url without using any of the custom tags given
- Counter not working correctly
- Generate Static Page to Show Search Results/Detail for API
- User meta query using Wildcard
- How do I use a plugin to swap out the template file for a custom post type?
- WordPress with React: Saving and Using Data Collected with fetch
- use a (Polymer) web component within a plugin (or theme)?
- Custom Post not Deleting on Uninstall
- Scripts/styles not loading on cloned WP Site when logged in
- how to add security questions on wp-registration page and validate it
- Multiple instances of $opt_name in redux framework
- Don’t print customizer styles when no setting has been used
- Initializing rest endpoint issue
- Using AJAX to submit and return data inside the WordPress Plugin Boiler Plate framework
- Append php file to footer
- Integrate separate web app inside wordpress [closed]
- How to avoid conflict if a plugin already have included open library?
- Can’t get wpColorPicker to work in a widget
- WordPress OOP get current user question?
- Plugin Activation Causes wp_register errors
- Load custom translation in custom plugin fails
- Add quick edit functionnality to plugin table
- How to filter an action inside class in MemberPress plugin?
- AJAX call of function containing javascript which is not loaded (Plugin development)
- XMLHttpRequest to open PHP file responds with Missing Page
- Including content into an add_shortcode() function
- Get the current post/page URL with plain permalinks
- Hide / show settings field based on other field’s value
- How to integrate plugins into block editor
- Group By in a Metaquery
- Pre-populated WooCommerce checkout fields: dropdown fields issue
- Using the same class across multiple functions
- Hide post by ‘post_category’
- jQuery dependent script ignores $in_footer bool and doesn’t work in header
- Woocommerce Product finder feature on home page
- How can I measure CPU and RAM used by my theme or plugin
- How do I show the HTML descrption in wordpress photo gallery for my individual gallery pages?
- want to confirm popup with “Yes” and “No” button when user click on add to cart
- Javascript scroll eventHandler only working when I’m logged in in WordPress
- Problem in plugin debuging in wordpress
- WordPress Iframe for blog image
- do I need to sanitize a shortcode’s function input?
- Email content as comment
- How to remove the WooCommerce Product->Category thumbnail from admin [closed]
- WordPress use template
- How to add admin.php to WP Admin Menu Link
- Is it possible to replace MySQL with JSON files for WordPress
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- WP Query date_query with several date range
- Adding body class in author page for custom role
- How to save multiple values in custom post type from front end to back end
- Add custom html classes to gutenberg wrapper
- Registration Forms
- Plugins Settings page not updating
- How to get access the ID of all posts of custom post type in Gutenberg editor
- Author Meta in Author URL Link
- Share functions between admin and frontend
- Editor Plugin – Breaks when toggling between Visual to Text
- Woocommerce Single Product Tabs Got Duplicate
- Replace the WordPress Media Library Uploader
- How to prevent users from deleting their accounts?
- Performing ajax request in wordpress
- How do I get a reference to the HTML memory buffer while the page is being constructed?
- do_action from within a class does not seem to work
- How to create save function for custom Gutenberg style block?
- Warning: Illegal string offset ‘Andorra’ in … on line 106
- Woocommerce product not appearing in category list page when created programatically [closed]
- Inserted data from database does not showing on front-page without referesh page?
- Error when activating a custom plugin on production server
- Remove tag from all posts when publishing new post
- add_meta_box does not display meta box in Admin
- How to call a plugin function from a page
- Allow user to add the php code in wp_mail()
- Custom Plugin activation error in Multisite
- The Events Calendar featured image as body background?
- woocommerce wc_get_product is not fetching all the product of particular category
- Integrating colorpicker into array field
- WordPress plugin how to run function when button is clicked
- wp_ajax function return the html page
- Buddy Press restrict the capability to edit users
- Override WooCommerce files from plugin
- using wordpress acf shortcods in tables goes outside the table
- Add WordPress Meta Box saved form input to WordPress RSS feed [duplicate]