Skip to content

Instantly share code, notes, and snippets.

@Irfan-Ansari
Created February 19, 2014 23:10
Show Gist options
  • Save Irfan-Ansari/9103589 to your computer and use it in GitHub Desktop.
Save Irfan-Ansari/9103589 to your computer and use it in GitHub Desktop.
How to set path in wordpress
//Basics & WordPress Standards
$absolute_path = __FILE__;
$path_to_file = explode( 'wp-content', $absolute_path );
$path_to_wp = $path_to_file[0];
require_once( $path_to_wp.'/wp-load.php' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment