The document discusses the WordPress loop, which is the core mechanism that displays blog posts on a WordPress site. It provides code examples of the basic loop structure, which includes calling get_header() and get_footer() around a check for posts and loop through them to display each post's title, content, and other information. It also explains how the loop works by retrieving posts and related data, then formatting and displaying it on the site.
UiPath Community: Communication Mining from Zero to Hero
The Loop
1. Doin’ da Loop
with da WordPrez
Gary Barber
radharc.com.au
manwithnoblog.com
2. I’m Assuming
• You know what WordPress is and you have used it.
3. I’m Assuming
• You know what WordPress is and you have used it.
• You know that you can use plugins and widgets
4. 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
5. 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
6. 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
7. 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
10. What is the Loop
• It’s the core of WordPress
• It’s a heap of PHP code over different files that works
together
11. 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
12.
13. So where is the Loop
• WordPress uses one
central control point
14. So where is the Loop
• WordPress uses one
central control point
• All requests go via this file
- index.php
15. 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
16. 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
17. 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 ....
18.
19. 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
20. 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(); ?>
21. How does it work
The Loop is really very basic
Show the Page Header
<?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(); ?>
22. How does it work
The Loop is really very basic
Show the Page Header
<?php get_header(); ?>
<?php if (have_posts()) ?>
<?php while (have_posts()) ?>
<?php the_post();?>
Do the Loop!
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
<?php get_sidebar();?>
<?php get_footer(); ?>
23. How does it work
The Loop is really very basic
Show the Page Header
<?php get_header(); ?>
<?php if (have_posts()) ?>
<?php while (have_posts()) ?>
<?php the_post();?>
Do the Loop!
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
Show the Page Footer &
<?php get_sidebar();?>
<?php get_footer(); ?>
Side Bar
24. In Detail
• Section One -
<?php if (have_posts()) ?>
checks information
<?php while (have_posts()) ?>
<?php the_post();?>
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
25.
26.
27.
28. In Detail
• Section One -
<?php if (have_posts()) ?>
checks information
• Section Two - gets
<?php while (have_posts()) ?>
the posts, and
<?php the_post();?>
more information
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
29.
30. In Detail
• Section One -
<?php if (have_posts()) ?>
checks information
• Section Two - gets
<?php while (have_posts()) ?>
the posts, and
<?php the_post();?>
more information
<?php the_content();?>
• Section Three -
<?php endwhile; ?>
displays the posts
and information
<?php endif; ?>
31.
32. And a Little Closer
• Check that there
<?php if (have_posts()) ?>
are posts
<?php while (have_posts()) ?>
<?php the_post();?>
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
33. And a Little Closer
• Get information on
<?php if (have_posts()) ?>
the post along with
secondary
<?php while (have_posts()) ?>
information like:
<?php the_post();?>
<?php the_content();?>
Post Title
<?php endwhile; ?>
Publication Date
Author
<?php endif; ?>
Categories
34. And a Little Closer
• Then WordPress
<?php if (have_posts()) ?>
displays the post
with all its
<?php while (have_posts()) ?>
formatting
<?php the_post();?>
information on
<?php the_content();?>
your blog
<?php endwhile; ?>
<?php endif; ?>
35. And a Little Closer
• Then WordPress
<?php if (have_posts()) ?>
goes and checks
for more posts and
<?php while (have_posts()) ?>
we start again.
<?php the_post();?>
<?php the_content();?>
<?php endwhile; ?>
<?php endif; ?>
36. Some Examples - Default
<?php get_header(); ?>
<div id=quot;contentquot; class=quot;narrowcolumnquot;>
<?php if (have_posts()) : ?>
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
37. Some Examples - Default
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
38. Some Examples - Default
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
39. Some Examples - Default
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
40. Some Examples - Default
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
41. Some Examples - Default
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
42. Some Examples - Default
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
43. Some Examples - Default
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
44. Items to Note
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
45. Items to Note
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
46. Items to Note
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
47. Items to Note
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
48. Items to Note
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
49. Items to Note
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
50. Items to Note
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
51. Items to Note
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
52. Life After the Loop
?php get_header(); ?
div id=quot;contentquot; class=quot;narrowcolumnquot;
?php if (have_posts()) : ?
?php while (have_posts()) : the_post(); ?
div class=quot;postquot; id=quot;post-?php the_ID(); ?quot;
h2a href=quot;?php the_permalink() ?quot; rel=quot;bookmarkquot; title=quot;Permanent Link to
?php the_title(); ?quot;?php the_title(); ?/a/h2
small?php the_time('F jS, Y') ? !-- by ?php the_author() ? --/small
div class=quot;entryquot;
?php the_content('Read the rest of this entry raquo;'); ?
/div
p class=quot;postmetadataquot;Posted in ?php the_category(', ') ? |
?php edit_post_link('Edit', '', ' | '); ?
?php comments_popup_link('No Comments #187;', '1 Comment #187;', '% Comments
#187;'); ?/p
/div
?php endwhile; ?
div class=quot;navigationquot;
div class=quot;alignleftquot;?php next_posts_link('laquo; Previous Entries') ?/div
div class=quot;alignrightquot;?php previous_posts_link('Next Entries raquo;') ?/div
/div
?php else : ?
h2 class=quot;centerquot;Not Found/h2
p class=quot;centerquot;Sorry, but you are looking for something that isn't here./p
?php include (TEMPLATEPATH . quot;/searchform.phpquot;); ?
?php endif; ?
/div
?php get_sidebar(); ?
?php get_footer(); ?
54. The Loop is Breeding
• The Loop is all through
WordPress
55. The Loop is Breeding
• The Loop is all through
WordPress
• In the Archive Template
56. The Loop is Breeding
• The Loop is all through
WordPress
• In the Archive Template
• In the Search Template
57. 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
59. Customise the Loop
• Change Archive and Search pages to display excerpt
• Customise the CSS for different times, dates, categories,
authors days of the week
60. 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
61. 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
62. 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
63. 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