For the last couple of days I have been working on a static front page or as i like to call it a Snapshot / Highlights page. Development has had a few issues mainly deriving from getting used to the wordpress loop, however all in all its a simple process.
For those of you who would like to follow in my footsteps a great guide can be found at richandstephsipe.com.
Now the likelihood is that I have been doing something wrong due to my lack of wordpress knowledge but it seems that utilizing a quiery_posts() (ability to exclude categories) call instead of get_posts() results in the loss of accurate Conditional Tags functionality within the sidebar. It is as if I have not closed a loop properly or cleared a variable and thus the last post is stored (must be my bad php).
This however is not the case for the header as it is parsed before the body. So to temporarily cater for this issue I used what I like to call a dirty hack, aka a global. Now if there is one thing I hate when it comes to coding its using globals (spit!).
Note also screwed my tag limit to 5 (my default posts per page) however this was easily fixed by modifying the request condition within my next page function like so:
if (is_category()) {
preg_match('#FROMs(.*)sGROUP BY#siU', $request, $matches);
} elseif (is_tag()) {
preg_match('#FROMs(.*)sGROUP BY#siU', $request, $matches);
} else {
preg_match('#FROMs(.*)sORDER BY#siU', $request, $matches);
}
Note the is_tag() condition that is provided via wordpress 2.2.
say what do you think
Turns out using a home.php page template caused this issue,
tree
bush
(Comments wont nest below this level)
arrdvark
(Comments wont nest below this level)
shrub