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 How to check if radio button is checked or not using JavaScript? #2 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #3 How to add Read More Read Less Button using JavaScript? #4 How to uninstall Cocoapods from the Mac OS? #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to Use SQL MAX() Function with Dates?

Recently Posted

#Aug 15 Is PHP still good for back-end programming? #Aug 10 How to create a multisite network in WordPress? #Aug 3 How to create a circle that follows a cursor using JavaScript and CSS? #Aug 3 How to make a curtain slider using jQuery and CSS? #Aug 2 How to progressively load images and add a blurry placeholder? #Aug 1 How to create a placeholder loader (throbber) using CSS?
You might also like these
Introduction to components and templates Part 4: Pipes and DirectivesAngularHow to Remove PHP File Extensions From Your Website URLs?PHPHow to calculate elapsed time in JavaScript?JavaScriptIntroduction to Angular modules Part 1: NgModule metadataAngularHow to Use the EXISTS and NOT EXISTS Operator with a Subquery in SQL and MySQL?SQL/MySQLWordPress get_posts ExamplesWordPressThe Lending Club Analysis using Logistic Regression and Random Forest in RStudioMiscellaneousWhat is IPS(Intrusion Prevention System), How Does It Work and What are the Detection Types?MiscellaneousWhat are Identifiers in JavaScript?JavaScriptWordPress: How to get field values in Advanced Custom Fields?WordPressHow to create a flip pricing table using CSS and JavaScript?CSSSelf-Driving and Intelligent NetworksMiscellaneous