Article Feed

Topic by Tag

Wordpress Tweaks

{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.
{0}

Random Anything

Do you like the idea of flipping pictures? I do. I think it creates a nice feeling of freshness without too much investment in creating actual content. Its actually very easy to implement.. Without much ado, lets dig in..
{0}

Organizing your theme folder

Hello, its wednesday again.. Happy Halloween.! Today, I shall be giving out a tip on how to organize your theme folder, in wordpress so as to get a grip on what you are doing. This is not so much wordpress, as more of a best practice..
{1}

Managing state in wordpress

Sometimes we want to display a different button for when you are logged-in (logged-in state) and another for when you are not.. (See pictures) loginbtnlogoutbtn