Get URL of a specific file

See Determining Plugin and Content Directories.

plugins_url( 'filename', __FILE__ );

… returns the full URI to the file in your plugin. For themes you use:

get_stylesheet_directory_uri() . '/path/to/file';

Leave a Comment

error code: 523