Article Feed

Category Tutorials

{0}

Number to text function, to render the number in words

Simply put, this function displays the total comments in your blog in words instead of a number. All you have to do is to copy the funtion below into your functions.php file.
{3}

Reverse Order in comments

Most wordpress themes (nearly all of them) display comments in an ascending order. That is the first comment is on top and the latest at the bottom of the page. If you are anything like me and want to dig into the latest comment right away, you would prefer a reverse ordering of comments. This is a preferred approach in popular blogs, as otherwise you have to literally scroll down zillions of comments, to finally reach the latest..

onetwothree

While achieving this in PHP is childs play, accessing a couple of functions in WP took some hunt and peck approach. I finally managed to locate the important functions that would get us the desired look.

{0}

Get Path

One cannot call an image directly in wordpress in your theme files. For instance I cannot actually place an image with the command this is an image When the page is displayed, nothing happens. This is because of WP taking into account the complete URL and not just referential paths. By providing the correct URL, it would make the task simple. The function getpath(); gets the full base path using the builtin wordpress "TEMPLATEPATH" function. It then substitutes the base path with the URL.