Doin’ da Loopwith da WordPrez
Gary Barberradharc.com.au
manwithnoblog.com
I’m Assuming• You know what WordPress is and you have used it.
I’m Assuming• You know what WordPress is and you have used it.
• You know that you can use plugins and widgets
I’m Assuming• You know what WordPress is and you have used it.
• You know that you can use plugins and widgets
• Your blog is not on wordpress.com
I’m Assuming• You know what WordPress is and you have used it.
• You know that you can use plugins and widgets
• Your blog is not on wordpress.com
• You know what PHP is
I’m Assuming• You know what WordPress is and you have used it.
• You know that you can use plugins and widgets
• Your blog is not on wordpress.com
• You know what PHP is
• You are not happy coding
I’m Assuming• You know what WordPress is and you have used it.
• You know that you can use plugins and widgets
• Your blog is not on wordpress.com
• You know what PHP is
• You are not happy coding
• You have never pulled the templates apart
...Boring...So Get on With It....
What is the Loop• It’s the core of WordPress
What is the Loop• It’s the core of WordPress
• It’s a heap of PHP code over different files that works together
What is the Loop• It’s the core of WordPress
• It’s a heap of PHP code over different files that works together
• Lets you display your posts, comments and the rest of your blog
So where is the Loop• WordPress uses one
central control point
So where is the Loop• WordPress uses one
central control point
• All requests go via this file - index.php
So where is the Loop• WordPress uses one
central control point
• All requests go via this file - index.php
• It’s your themes central control
So where is the Loop• WordPress uses one
central control point
• All requests go via this file - index.php
• It’s your themes central control
• Remove it you get the default theme
So where is the Loop• WordPress uses one
central control point
• All requests go via the file - index.php
• It’s your themes central control
• Remove it you get the default theme
• Remove that ....
So where is the Loop• WordPress uses one
central control point
• All requests go via the file - index.php
• It’s your themes central control
• Remove it you get the default theme
• Remove that and you get nothing
How does it work The Loop is really very basic
<?php get_header(); ?>
<?php if (have_posts()) ?> <?php while (have_posts()) ?> <?php the_post();?><?php the_content();?> <?php endwhile; ?>
<?php endif; ?>
<?php get_sidebar();?><?php get_footer(); ?>
How does it work The Loop is really very basic
<?php get_header(); ?>
<?php if (have_posts()) ?> <?php while (have_posts()) ?> <?php the_post();?><?php the_content();?> <?php endwhile; ?>
<?php endif; ?>
<?php get_sidebar();?><?php get_footer(); ?>
Show the Page Header
How does it work The Loop is really very basic
Show the Page Header
Do the Loop!
<?php get_header(); ?>
<?php if (have_posts()) ?> <?php while (have_posts()) ?> <?php the_post();?><?php the_content();?> <?php endwhile; ?>
<?php endif; ?>
<?php get_sidebar();?><?php get_footer(); ?>
How does it work The Loop is really very basic
<?php get_header(); ?>
<?php if (have_posts()) ?> <?php while (have_posts()) ?> <?php the_post();?><?php the_content();?> <?php endwhile; ?>
<?php endif; ?>
<?php get_sidebar();?><?php get_footer(); ?>
Show the Page Header
Do the Loop!
Show the Page Footer & Side Bar
In Detail <?php if (have_posts()) ?>
<?php while (have_posts()) ?>
<?php the_post();?>
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
• Section One - checks information
In Detail <?php if (have_posts()) ?>
<?php while (have_posts()) ?>
<?php the_post();?>
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
• Section One - checks information
• Section Two - gets the posts, and more information
In Detail <?php if (have_posts()) ?>
<?php while (have_posts()) ?>
<?php the_post();?>
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
• Section One - checks information
• Section Two - gets the posts, and more information
• Section Three - displays the posts and information
And a Little Closer <?php if (have_posts()) ?>
<?php while (have_posts()) ?>
<?php the_post();?>
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
• Check that there are posts
And a Little Closer <?php if (have_posts()) ?>
<?php while (have_posts()) ?>
<?php the_post();?>
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
• Get information on the post along with secondary information like:
Post TitlePublication DateAuthorCategories
And a Little Closer <?php if (have_posts()) ?>
<?php while (have_posts()) ?>
<?php the_post();?>
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
• Then WordPress displays the post with all its formatting information on your blog
And a Little Closer <?php if (have_posts()) ?>
<?php while (have_posts()) ?>
<?php the_post();?>
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
• Then WordPress goes and checks for more posts and we start again.
Some Examples - Default<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Some Examples - Default<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Some Examples - Default<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Some Examples - Default<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Some Examples - Default<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Some Examples - Default<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Some Examples - Default<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Some Examples - Default<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Items to Note<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Items to Note<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Items to Note<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Items to Note<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Items to Note<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Items to Note<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Items to Note<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Items to Note<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
Life After the Loop<?php get_header(); ?><div id="content" class="narrowcolumn"><?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div><?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?></div><?php get_sidebar(); ?><?php get_footer(); ?>
...So when does it get Interesting...
The Loop is Breeding• The Loop is all through
WordPress
The Loop is Breeding• The Loop is all through
WordPress
• In the Archive Template
The Loop is Breeding• The Loop is all through
WordPress
• In the Archive Template
• In the Search Template
The Loop is Breeding• The Loop is all through
WordPress
• In the Archive Template
• In the Search Template
• It’s even used for the generation of the comments
Customise the Loop• Change Archive and Search pages to display excerpt
Customise the Loop• Change Archive and Search pages to display excerpt
• Customise the CSS for different times, dates, categories, authors days of the week
Customise the Loop• Change Archive and Search pages to display excerpt
• Customise the CSS for different times, dates, categories, authors days of the week
• Change your home page to a static one
Customise the Loop• Change Archive and Search pages to display excerpt
• Customise the CSS for different times, dates, categories, authors days of the week
• Change your home page to a static one
• Place items between blog posts
Customise the Loop• Change Archive and Search pages to display excerpt
• Customise the CSS for different times, dates, categories, authors days of the week
• Change your home page to a static one
• Place items between blog posts
• Add a Lemon
Customise the Loop• Change Archive and Search pages to display excerpt
• Customise the CSS for different times, dates, categories, authors days of the week
• Change your home page to a static one
• Place items between blog posts
• Add a Lemon
• But check for Plugins or Widgets first
Customising Demo
Thankyou• wordpress.org• mattread.com• ifelse.co.uk• Pennance368• fensterbme • fotopeet• gerardvschip• Niklas
• drpritch• pierre pouliquin
Distributed under Creative Commons License
Gary [email protected]
radharc.com.aumanwithnoblog.com
Top Related