feed me feed me chillireward

Category Wordpress Tweaks

This is a collection of tips, tweaks and tutorials to make your wordpress theme building and blog running a little easier. The learning is short or nugget style.

Among the myriad of CMS out there, undoubtedly wordpress stands out as a leader! In this section, I have posts related to tweaking wordpress. I have tried to include topics of interest, and strove to keep the learning short and sweet.

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..

...
 

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 ...
 

Dynamic homepage based on interestingness

 
I am pretty tired of blogs that have 'n' number of posts aired on their landing page with a column of info on either side. That was one of the the reason I rehauled my site. I now have a situation wherein the latest 2 posts are displayed on the homepage, and if there is an announcement, the latest single post and the announcement is displayed. Its not rocket science, and its pretty easy to implement.. AIM: If ...
 

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 content. Its actually very easy to implement.. step1: create a folder in the images folder of your current theme directory. Lets say you call it "rotimages" [ yourwpdirectory / wp-content / themes / currenttheme / images / rotimages] step2: copy all the images you want to display ...
 

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.. Don't insert your entire code into your sidebar.php, header.php, home.php, page.php, single.php pages... Instead work with chunks.. What do I mean? I shall demonstrate by example.. If you look into my ...
 

Managing state in wordpress

 
Sometimes we want to display a different button for when you are logged-in and another for when you are not.. (See pictures) Login button example logout button example /*we figure out if user is logged in? If not logged in, show button, else show button */ a href='/ wp-login.php”target=“new” class=“login”> login / wp-login.php?action=logout” target=“new” class=“logout”> logout

Instead of styling the link classes, you can also just change the text

...
 

Is your site i-phone ready?

 

In an ideal web world, all websites should display the same in any media or device.. (screen, printer, mobile, speech synthesiser etc. etc.)  This actually helps a lot of readers recieve the website in a manner that is correct for them.  What do I mean?  The sight impaired can either recieve a site in a braille friendly manner or listen to the site read out to them  in an audio format. (text to speech.).

For a very normal reader,

...
 

I Love Wordpress buttons

 

I was thinking about how wordpress was used by bizzillions, and how we all love it.  Keep it coming Matt and kudos to all the wonderful faces behind this beautiful product.  So with all this love and good feeling oozing out, I decided to make some simple buttons, that you could use in your blog.  Please do not link back to these original images, as I have to pay through my nose, if you do so

...