Hey all. I've set up a specific page template for a page of posts. Basically I wanted to create a page where I can put off topic posts. I changed my code to ignore a specific category on the home page but display it on a specific page.
I've gotten all to work well, except I want to have an into paragraph of simple HTML type that explains what you are looking at. I tried adding text outside of the loop and in other pages, but it won't display on the page.
And the code:
<?php
/*
Template Name: kickstand
*/
?>
<?php get_header(); ?>
<div id="posts">
I WANT MY TYPE TO GO BEFORE THE POSTS
<?php
if (is_page('158') ) {
$cat = array(143);
} else {
$cat = '';
}
$showposts = -1; // -1 shows all posts
$do_not_show_stickies = 1; // 0 to show stickies
$args=array(
'category__in' => $cat,
'showposts' => $showposts,
'caller_get_posts' => $do_not_show_stickies,
);
$my_query = new WP_Query($args);
?>
</div>
<?php endwhile; ?>
<?php else : ?>
<div class="post">
<ul class="pinfo">
<li class="lileft"><span> 44 <br />
<em> day </em></span></li>
<li class="liright">
<div>
<div>
<h1>Hmm! To bad this is a 404 error</h1>
</div>
</div>
</li>
</ul>
<div class="postcontent">
<?php _e('Sorry, no posts matched your criteria.'); ?>
</div>
</div>
<?php endif; ?>
<div id="comments">
<?php comments_template(); ?>
</div>
</div>
<?php include('rsidebar.php'); ?>
<?php get_footer(); ?>
Any suggestions would be much appreciated.