Simple three column green Wordpress template

Posted by ljmacphee on October 15, 2007 under hack your template, wordpress template | Be the First to Comment

This is a very simple three column template for Wordpress. It is meant to be very easy for you to change colors and the header and anything else you’d like to adjust. I kept the CSS template as simple as I could. Enjoy and hack away.

threecolumngreen.tar.gz

Here is a plugin to print a list of all your posts by category in Wordpress

Posted by ljmacphee on October 1, 2007 under archives, hack your template, how to, wordpress, wordpress template | 14 Comments to Read

Over time all your posts get buried. If someone visits your blog can that person easily find a post she is looking for? Can someone find a post related to one he is viewing? Wordpress archive pages give you a list of categories and a list of months but no direct links to your posts. You know what they say, 3 clicks and your visitor is gone.

So I wanted an archive that listed all my posts, by category, alphabetically by title. So I started with Frucomerci’s ‘List Posts by Category Plugin for Wordpress and shamelessly hacked his plugin.

The new plugin ArchiveByCategory lists all your published blog posts by category alphabetically.

Download, unzip, upload to your plugin directory and active the plugin.

Oct 17th —————————————————————————–

Ok I’ve been told you’all don’t like hacking your templates. So you can just create a post or page; click the ‘code’ button an add the following line

<!– archivesbycategory –>

Braver folks can follow directions below to hack your template

* thank Rob at Backyard Chickens for letting me know you wanted this.

—————————————————————————————-

Now an archive page is needed. Next you need to hack your template. Open up ‘archives.php’ [ not archive.php ] and find the line

<?php wp_list_categories(’title=0′); ?>

Yours might be slightly different. Remove that line and put in its place:

<?php echo archives_by_category(); ?>

Now all you have to do is create a page - call it ‘Archives’ and select ‘Archives’ as the page template. Nothing else needs to be done but to ‘publish’ the page.

I’ve built in anchor links to the page. It will get very long over time. You will want to create anchor links to each category. ( See How and why you should use anchor links ).

The archives page will update itself with all your news posts as you publish them. Nothing more need be done once this has been set up.

[ check sidebar for newest versions ]
*If you are using Wordpress 2.3 download the ArchivesByCategory V 2.2 I totally cleaned up the MySQL and php and it is easier to read, for you to configure and should run a little faster.

*If you are using an earlier Wordpress version you need ArchivesByCategory V 1.0

If you just want to list one category of posts see:
Plugin to list one category of posts ( WP < 2.3 )
Plugin to create a list of posts for one category ( WP>2.3 )

Wordpress 2.3 to upgrade or not to upgrade?

Posted by ljmacphee on September 28, 2007 under wordpress, wordpress template | Be the First to Comment

While there has been Much ado over nothing at Slashdot, to upgrade or not is the question now for Wordpress users.

Myself I am holding off. All plugins that use categories are now broken. Why Wordpress didn’t make things backwards compatible I am not sure? Until I, or someone else, re-writes the plugins I use that work with categories. I won’t be upgrading. ( I’m hoping to rewrite several this weekend. Check back next week. )
I strongly suggest you do a test upgrade on your home computer, test your plugins, template etc before upgrading on your webhost.

Old Tables:
wp_post2cat: post_id, category_id
wp_categories: cat_ID, cat_name

New Tables:
wp_term_relationship: object_id, term_taxonomy_id
wp_term_taxonomy: term_taxonomy_id, term_id, taxonomy, description, parent, count
wp_terms: term_id, name, slug, term_group

Before to get category names from a post you went from post2cat->category_id and matched it to wp_categories->cat_ID and grabbed the name.

Now to get category names from a post you go from wp_term_relationship->term_taxonomy_id and match it to wp_term_taxonomy->term_taxonomy_id and fetch term_id after which you must then go to wp_terms match term_id and fetch the name.

So dust off those MySQL books if you have plugins that need fixing.