WordPress Logo

WordPress Developer Helper Functions For Locating Files

WordPress comes with helper functions to located, files, images, documents within your plugin or theme.
Here is a list of some of the most used functions developer use:

1. get_theme_root() : returns the address of the theme installation directory.
2. plugins_url() : returns the address of the plugins directory.
3. get_template_directory_uri() : retrieves the URI to the current theme’s files.
4. admin_url() : provides the address of the WordPress administrative pages.
5. content_url() : indicates where the wp-content directory can be found.
6. site_url() : returns the address of the website.
7. home_url() : returns the address of the website.
8. includes_url() : provides the location of WordPress include files.
9. wp_upload_dir() : indicates the directory where user-uploaded files are stored.

Blog, WordPress,

Leave a Comment

Your email address will not be published.