Fun With Dates

Working with dates in PHP can get cumbersome. Especially when you need to calculate a date occurrence in the past or future. These examples should help get those dates, and output them in a human readable format. PHP Date Formatting Y 4 digit year (2018) y 2 digit year (18) F Long month (January) M […]

Fun With Dates Read More »

Working With Taxonomy’s

I recently needed to work with a taxonomy that was created for a custom post type, where I needed to access the parent taxonomy.  I came across this same code in the wordpress support forums.  It should be useful when working with taxonomy’s in the future. reference:

Working With Taxonomy’s Read More »

$_SERVER[‘DOCUMENT_ROOT’], You’ve Done Me Wrong

$_SERVER[‘DOCUMENT_ROOT’] is good for getting the full path to your websites root folder, but depending on the DocumentRoot directive in httpd.conf you may or may not have a forward slash at the end of the returned url.  This always annoys me when developing locally and everything is working.  Then you upload and test on the production system,

$_SERVER[‘DOCUMENT_ROOT’], You’ve Done Me Wrong Read More »

Scroll to Top