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
- How can I load a page template from a plugin?
- How to call images from your plugins image folder?
- Why does WordPress have a noop.php file?
- Overwrite theme file from plugin
- Any examples of adding custom fields to the category editor?
- How-to implement admin Ajax inside an admin WP_List_Table?
- What is the etiquette on extending a plug-in
- How to pass a parameter to this add_filter example [duplicate]
- How to get Post ID with the Add Filter Function
- WP 3.3 Tooltips API?
- Clarity needed on usage of multiple 403 forbidden header() functions at the beginning of the plugin files
- Cron firing my function everytime wp-admin is visited
- Formatting of curly brackets array from WP database to get more readable output
- How to find attachment ID for first image in a post
- update_option is not working!
- What URL do you pass to wp_remote_get to load the body of the current post’s preview?
- wp_enqueue_style built in styles
- issues including a file from a plugin directory
- Override pluggable functions in a plugin?
- How do I create a custom api endpoint?
- Add tab to profile.php wordpress plugin development
- Sharing a common set of image files for media library, across all sites within multisite
- Plugin update not reflected in WordPress plugin page
- How do I alter the comment form ‘allowed tags’ text in a plugin?
- Error : “Cannot use object of type WP_Post as array in”
- How to show active version on wordpress.org of a published plugin?
- How to create database table, add data, update and delete using wpdb via plugins?
- Find out Requires WP tag for a plugin when submitting it
- Extending theme PHP class in plugin
- Any ideas to trigger some code after plugin update?
- WP Editor Issue in Backend
- How to test plugin update through WordPress plugin updater without tagging new release in the repo
- On the .org repo, can your plugin name/slug contain “WooCommerce” [closed]
- WP and object persistence (or lack thereof)
- UWooCommerce – add cart discount programmatically?
- Bad Request in AJAX
- Remove sidebar on single page using plugin API
- When does save_post hook fire on post save/update
- Enqueuing scripts and styles in custom plugins
- Include file in plugin file
- WP nonce field checkbox prints checked=’checked’ outside input field
- Shortcode not appearing when used as post content in wp_insert_post() or possibly, shortcode not being registered at all
- Get thumbnails with array sizes parameter
- Why would someone use function_exists(‘add_action’) in a plugin?
- How to add Plugin functionality in WordPress Frontend Menus
- in_array function Problem
- Best practice for plugin: always detect admin-ajax call?
- Adding another field to user table
- How to hide page links from theme menu
- Brainstorm – Slow Query from Plugin Need to Speed It Up
- How to share user data across multiple WordPress websites?
- How to add text editor in plugin menu?
- How to properly create table in plugin
- Console errors in 6.0-RC1 Widget screen
- Set the payment processor callbacks to a plugin
- Error code when migrate
- How to control ajax calls without effecting memory of server?
- Add two button to page and post admin to redirect to : add new & list of (posts – pages) just after saving post or page
- WordPress: I wanted to use Add rewrite rule multiple times for multiple CPT in my plugin
- WordPress Query doesn’t return the correct value
- Uncaught Error: Call to undefined function wp_get_current_user() in
- How do I show how many products are remaining from the bought package
- Group By in a Metaquery
- wp_ajax function return the html page
- Autoloading Classes in Plugins
- Where to store Plugin specific information in the database
- Developing a plugin where users can edit entries saved in database
- How to create session for user which is not an admin user
- Any way to make Apache’s internal redirect work?
- New Users are saved with no role selected
- get_option() is undefined in TinymceWindowManager
- Getting duplicate page when activating my plugin
- Modify request query string before plugins
- Plugin error on activation – breaks page encoding and prints the code of plugin php files
- wordpress plugins with add-ons
- WordPress Plugin default option
- how to insert content into wp_head after loop_end
- oneOf two possible objects in WP REST API?
- WordPress simple ‘Hello World’ plugin – problems
- How to display .ptm file in my WP site without JAVA
- How to replace content of a block in and re-render on change?
- extending a core block doesn’t work inside the editor
- register_activation_hook doesn’t execute without add_action(‘init’,’some-function’)
- Getting similar posts by custom field value
- Does WP REST API cache internally executed (rest_do_request) requests?
- Trouble Importing whatsapp-web.js in a WordPress Plugin Development
- ‘useSate’ error when using React on the frontend in custom block plugin