WordPress Snippet: Complete List of Posts

If you're new here, you may want to subscribe to my RSS feed. One advantage of subscribing to RSS feeds is that you don't have to constantly re-visit this site to check for updates within specific sections you might be interested in because your browser or Feed reader will do this for you automatically on a regular basis plus you can even get email notification. Thanks for visiting!


[View FULL Article]
query_posts($query_string.'posts_per_page=-1');

while(have_posts()) {
the_post();

the_time();
the_title();
}


This will display the time and title for all your posts. This could result in a very long page, and a more usable way of doing it would be to change the posts_per_page parameter, and add Next and Previous links to navigate the whole list. Code snippet by Otto in the wp-hackers mailing list.




Article copyright BookOfTips.Blogspot.Com - Find helpful tips that can help you with your daily activities. All rights reserved. No part of an article may be reproduced without the prior permission.




Wordpress tips and tricks - custom 404 (error) pages

If you're new here, you may want to subscribe to my RSS feed. One advantage of subscribing to RSS feeds is that you don't have to constantly re-visit this site to check for updates within specific sections you might be interested in because your browser or Feed reader will do this for you automatically on a regular basis plus you can even get email notification. Thanks for visiting!


[View FULL Article] One of the more underused features in wordpress themes is the ability to create and modify the 404 page - so to try to rectify this I thought I’d run through what I do with 404 pages on Binary Moon (and my other Wordpress site). I use this simple technique to try to make errors a bit more and helpful for people who have ended up at the wrong place. I’m hoping that not too many people see the 404 page but just in case here is what I’ve done.
Basically I duplicate a normal page template and name it "404.php". I then remove "the loop" and add some some static code which explains that there has been an error and a few possible solutions (archives, search).
Finally I use query_posts to add in a new loop which displays links to the 5 most recent articles. Below is the actual code I use on this site for my 404 page (you can see it in action here - http://www.binarymoon.co.uk/9837489)



Article copyright BookOfTips.Blogspot.Com - Find helpful tips that can help you with your daily activities. All rights reserved. No part of an article may be reproduced without the prior permission.




11 Principles to Design a Great Wordpress Theme

If you're new here, you may want to subscribe to my RSS feed. One advantage of subscribing to RSS feeds is that you don't have to constantly re-visit this site to check for updates within specific sections you might be interested in because your browser or Feed reader will do this for you automatically on a regular basis plus you can even get email notification. Thanks for visiting!


[View FULL Article] After a couple weeks of reviewing Wordpress themes (and countless weeks prior judging designs in general) I have established the following guidelines for creating an awesome Wordpress theme. At the very least, following these guidelines will get a stamp of approval from picky designers.

At the same time, pay attention to these things when choosing a theme. If the author went through the trouble to follow certain standards, I’ll bet it is quality work.

1. Validate your code

I can’t emphasize this enough. Honestly, for how easy it is to validate your work, the lack of proper validation is evidence of a lazy theme author that doesn’t bother to run a couple checks. Validate your HTML. Then validate your CSS. Think of it as using good grammar. Everyone will appreciate it.

2. Make it work across browsers

Firefox, Internet Explorer, Opera…the big boys are important. According to Jakob Nielsen in Prioritizing Web Usability, best practice is to wait six years after the release of a new browser before ignoring an old one. Thankfully we can forget about IE5. But IE6 is still out there. Prepare for all browsers, and if you can’t make it work, add in fixes so your theme degrades gracefully. A very useful tool for this purpose is Browsershots.org.

3. Comment your code

For some themes this is not a big problem. If you don’t modify much from the default WP theme, it probably isn’t a big deal. Use this principle: if you won’t be able to follow your code in two years, no one else will be able to tomorrow. Comment more than you think you should.




Article copyright BookOfTips.Blogspot.Com - Find helpful tips that can help you with your daily activities. All rights reserved. No part of an article may be reproduced without the prior permission.