02-10-2010

PHP Wordpress cheat sheet

Template tags related to setting / getting paths and directories:

bloginfo('template_directory')	-	prints out the relative path to the  template`s directory
bloginfo('url')			-	prints out path to the websites root directory
wp_upload_dir(); 		-	returns something like the following (if successful):
Array ( 
		[path] => C:\path\to\wordpress/wp-content/uploads/2010/05 
		[url] => http://example.com/wp-content/uploads/2010/05 
		[subdir] => /2010/05 
		[basedir] => C:\path\to\wordpress/wp-content/uploads 
		[baseurl] => http://example.com/wp-content/uploads 
		[error] => 
) 
 
 

3.0 menu's reference: http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus

wp config:

// display errors
define('WP_DEBUG', true);

Comments:

Your comment:

»

 

[x]