Tutorial Based On The Default WordPress Theme (Kubrick v1.5)
This tutorial will roughly guide you on how to integrate wp-email.php, wp-polls.php, wp-stats.php and wp-useronline.php into your WordPress Theme.
This is normally how the html/php codes of a WordPress Theme looks like:
Now, let us split the html/php codes into 3 main parts, namely Top, Content and Bottom. We will ignore the left/right sidebar because if it is a left sidebar it will be under Top and if it is a right sidebar, it will be under Bottom.
For Top, we use <?php if (have_posts()) : ?> as a guide on where Top ends.
For Bottom, we use <?php endif; ?> as a guide on where Bottom starts.
The area in white contains all the contents. Most of the information there is not important, we need to only extra 2 lines Line 9 And Line 19 (as shown).
We extract these 2 lines because it define the style of an individual post.
Line 9 will then belong to Top because it is the start of the individual post style.
Line 19 will belong to Bottom because it is a closing tag to that individual post style.
Now Top will look like this:
Note: We remove id="post-<?php the_id(); ?> from Line 9 because it is redundant.
Now Bottom will look like this:
The Top Template for wp-email.php, wp-polls.php, wp-stats.php and wp-useronline.php will look something like this:
Or
You need to replace the contents of Top Template with the contents of Top.
The Bottom Template for wp-email.php, wp-polls.php, wp-stats.php and wp-useronline.php will look something like this:
You need to replace the contents of Bottom Template with the contents of Bottom.
That is all. Remember, this is just a rough guide and it is based on the default WordPress Theme (Kubrick v1.5). As WordPress Theme structure varies ALOT, I can't guarantee the accuracy of this tutorial.