View Full Version : WordPress
Blue Cat Buxton
05-11-2005, 02:23 PM
I am messing around with a wordpress blog / site layout
Are there any easy guides to messing with the layout / themes to make the layout more customised.
Just need a pointer or two to get started
moonshield
05-11-2005, 02:48 PM
James looks like he is the master of this, he seems to know his way around wordpress. I just use the default template :)
ozgression
05-12-2005, 03:22 AM
Are you using WordPress 1.5? If so, the templating is very simple to use (a file for the header, a file for the footer etc).
James
05-13-2005, 06:45 PM
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
<?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:
<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.
<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.
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
This is the Pingback URL (http://faq.wordpress.net/view.php?p=22).
This isn't syndication stuff:
<?php wp_head(); ?>
For me, this just adds
<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.
<?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 (http://toolazytoblog.com/archives/2005/01/04/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 (http://codex.wordpress.org/Template_Tags).
and if you want your archives like on my blog (http://toolazytoblog.com), just use
<?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 (http://wordpress.org/docs/template/).
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
ozgression
05-14-2005, 02:26 AM
I hate the dashboard too. :) But, there is a hack to get rid of it floating around somewhere...
Blue Cat Buxton
05-16-2005, 01:24 AM
Thanks Ozgression & James, that is really helpful. I just got really really confused when I first installed it but it was late. I couldn't see the template files for looking.
Those are some nice features James, thanks. A bit advanced for where I am right now but lots of things to play with!
chromate
05-17-2005, 02:12 PM
I think this may have been asked somewhere before (but I can't find it)... Is it possible to make a kind of multi-user version that uses wordpress? I'm thinking of setting up a community on a specific topic and what I want to do comes pretty close to a kinda multi-user blog I think. So, each user can maintain their own little area of the site.
Any ideas how this can be done using existing blog software? I don't really wanna code it from scratch if it can be avoided! :)
moonshield
05-17-2005, 04:05 PM
wordpress does have multiple user abilities.
James
05-17-2005, 08:16 PM
Some day I'll write some articles up for WordPress users, making it VERY easy for them to learn everything from little stuff, to advanced. Takes little more than some HTML knowledge, knowing the basics of what you need to include, and understanding (basically) how functions work in programming.
chromate
05-18-2005, 05:45 AM
Yeah, I've installed WPMU and it all works fine. However, it seems new users can only post to the same blog. I want them to register and have their own seperate blogs they can maintain.
I guess I should be asking all this in the WordPress support forums really. Thought I might be able to get a quick answer from James though as he seems to be a WordPress king! :)
The other thing I don't like is the control panel for writing new posts. It's pretty hard to add images for my users that will have no tech know-how whatsoever. The site I wanna setup will have a lot of images in the posts. But that's a side issue at this stage.
James
05-18-2005, 08:04 AM
Well, to do something like this would most likely require a hack... lemme take a look...
Ah, here's one: http://wordpress.org/support/topic/29142
Not sounding like it's in a well-developed stage at the moment though.
My suggestion: if it's only for a few people, install multiple instances of WordPress on the server. That's really your only alternative unless you can find a good hack.
chromate
05-18-2005, 08:59 AM
Hopefully, it will be for a lot of people eventually. It needs to therefore be automated.
I think I might create my own script to take care of it. Maybe with a few elements of WordPress in it.
Todd W
05-18-2005, 05:01 PM
Hopefully, it will be for a lot of people eventually. It needs to therefore be automated.
I think I might create my own script to take care of it. Maybe with a few elements of WordPress in it.
Cool, I had planned on starting a multi-person type Blog but never got around to getting it up and running. I`ll be interested to see how yours' does.
chromate
05-18-2005, 05:07 PM
I'll let you know when I get it rolling :) Hope to do it ASAP. But you know how these things go sometimes ;)
Todd W
05-18-2005, 05:18 PM
I'll let you know when I get it rolling :) Hope to do it ASAP. But you know how these things go sometimes ;)
Yeah, ASAP was 3 months ago :p
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.