Oh man is it easy.
It's all laid out very simply. If you're using something below WP 1.5, at least, which is all that I use, because--to be frank--I hate that damn dashboard.
You just need to take your design, which I assume'll be valid XHTML 1.1 Strict, and valid CSS 2.... make a backup of your default Wordpress design, which is in index.php. Now open up your site's design in Notepad.
NOTE: FOR WP 1.2.2
add
Code:
<?php
/* Don't remove this line. */
require('./wp-blog-header.php');
?>
to the top of the file, above your DOCTYPE declaration, and <head> tag, etc.
I figure I don't need to mention adding the stuff to make your page validate better, because if you're into that stuff you'll already know to shove it all in there.
Optional syndication stuff to shove between your <head> tags:
Code:
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
This'll tell the computer where your RSS 2.0 file is.
[code]<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />]
" where your RSS 0.92 file is.
Code:
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
" where your Atom file is.
Code:
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
This is the Pingback URL.
This isn't syndication stuff:
Code:
<?php wp_head(); ?>
For me, this just adds
Code:
<meta name='ICBM' content="0, 0" />
<meta name='DC.title' content="Too Lazy To Blog" />
<meta name='geo.position' content="0;0" />
to the head of my site... Basically what it does is adds a bit more accessibility to your site, saying where on it the User is.
Code:
<?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<div class="entry"><h2><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h2>
<b class="date"><?php the_time('F j, Y'); ?></b>
<br />
<?php the_content(); ?>
<div class="comments"><strong><a href="<?php comments_link() ?>"> <?php comments_number() ?></a></strong></div></div>
<?php include(ABSPATH . 'wp-comments.php'); ?>
<?php } } else { // end foreach, end if any posts ?>
<p>Sorry, no posts matched your criteria.</p>
<?php } ?>
This is an if statement that tests if there are posts matching their criteria (basically, if you go to http://toolazytoblog.com/archives/2005/01/04/sdfsdfsdf/, which is just the URL of my Tsunami Relief entry, and change 'tsunami-relief' in the URL to 'salty-bacon' it'll just return "Sorry, no posts matched your criteria").
If there is/are a post(s) matching the criteria, however, this will return each of the posts it'll create
- an entry within a div
-- the h2 header linking to the permalink of the entry, with the title of the post as it's text.
-- the date in bolded text, with the class .date
-- a line break, then the content, eg. whatever you've written as the post.
-- a new div, .comments
--- a bolded link to the comments, saying '[number, or 'No', depending on if there are comments or not] Comments'.
-- the end of the .comments div
- the end of the .entry div.
Now, this is pretty easy to mess around with to get the results you're looking for. Just remember the Template Tags.
and if you want your archives like on my blog, just use
Code:
<?php get_archives('monthly', '', 'html', '', '', TRUE); ?>
---------------
Note that all this is basically just walking through how I made mine. It'll be different for other sites and other versions of WP.
But it's just plain easy for me to do this as of the moment, so I don't think I'll be switching versions. If you're on the new version, however, they say the templating system is the cat's pajamas, so if you're using the suave new templating system of the blogging tool that's the bee's knees, then just head over here for the Templating Documents of WordPress 1.5.
Hopefully I've either helped you, or hopelessly confused you. The first one's better for you, the second is funner than me.
PM me if you need any help, even if you're using 1.5
Bookmarks