How to get the current plugin folder url in WordPress? Posted on October 13, 2017 by admin plugin_dir_url( ) function is used to get the current url. Sample: $imgurl=plugin_dir_url( __FILE__ ).”placeholder.png”;