Yogesh Chauhan's Blog

List of WordPress directories functions

in WordPress on June 15, 2021

Here’s the list of functions that are helpful to get directories path in WordPress. You can use it while developing a theme or even creating a plugin.

WordPress Directories Functions

Get Home URL

  echo home_url();

Get Site directory URL

  echo site_url();
  http://www.yogeshchauhan.com or 

Get Admin directory URL

  echo admin_url();

Get Includes directory URL

  echo includes_url();

Get Content directory URL

  echo content_url();

Get Plugins directory URL

  echo plugins_url();

Get Upload directory URL (an array)

  echo wp_upload_dir();

Most Read

#1 Solution to the error “Visual Studio Code can’t be opened because Apple cannot check it for malicious software” #2 How to add Read More Read Less Button using JavaScript? #3 How to check if radio button is checked or not using JavaScript? #4 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #5 How to uninstall Cocoapods from the Mac OS? #6 PHP Login System using PDO Part 1: Create User Registration Page

Recently Posted

#Apr 8 JSON.stringify() in JavaScript #Apr 7 Middleware in NextJS #Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface
You might also like these
How to Validate User Name, Email Address and URL in PHP?PHPEverything you need to know about ANY, SOME and ALL Operators in PostgresPostgresHow to Clone Objects in PHP?MiscellaneousThe Types of DatabasesMiscellaneousWhat are keys in React?ReactHow to convert datetime to date format in JavaScript?JavaScriptHow to convert a number rounding to a specified number of decimals in JavaScript?JavaScriptPostgreSQL transactions using the BEGIN, COMMIT, and ROLLBACK statements.Postgres10 Usability Blunders to AvoidUI/UXHow to get Current Hour, Minute and Second in JavaScript?JavaScriptReview an intentionally vulnerable plugin in WordPressWordPressWordPress 5.7 is migrating to latest jQuery version and people are freaking outjQuery