Fixed number_rows function issue.
Added in a bit of code (untested) for interfacing with the Wordpress database.