That does the trick for the homepage problem. Thanks
I still have the problem of the permalinks, Cal links, and even the More… link only passing the post_id like this:
index.php?p=5#more-5
If I manually add the cat like this:
index.php?p=5#more-5&cat=5
then it works… My code is doing something like this:
if (empty($_SERVER['QUERY_STRING'])) { $cat = 1;}
$cat_title = show_category_posts('category='.$cat);
switch ($cat) {
case 1:
$home = "images/home_over.jpg";
$home_scrub = "images/home_scrub_over.gif";
$cat_value = 1;
break;
case 14:
$event = "images/events_over.jpg";
$event_scrub = "images/events_scrub_over.gif";
$cat_value = 2;
break;
case 2:
case 3:
case 4:
case 5:
$rsc = "images/rsc_over.jpg";
$rsc_scrub = "images/rsc_scrub_over.gif";
$cat_value = 3;
break;
case 7:
case 8:
case 9:
case 10:
$theater = "images/theater_over.jpg";
$theater_scrub = "images/theater_scrub_over.gif";
$cat_value = 4;
break;
case 15:
$store = "images/store_over.jpg";
$store_scrub = "images/store_scrub_over.gif";
$cat_value = 5;
break;
case 6:
$contact = "images/contact_over.jpg";
$contact_scrub = "images/contact_scrub_over.gif";
$cat_value = 6;
break;
case 11:
$about = "images/about_over.jpg";
$about_scrub = "images/about_scrub_over.gif";
$cat_value = 7;
break;
}
show_category_posts() sets the global $scp_posts. The other section of the code looks like this:
<?php echo '<h4>'.$cat_title.'</h4>';
if ($scp_posts) : foreach ($scp_posts as $post) : start_wp(); ?>
<?php the_date('','<h2>Posted: ','</h2>'); ?>
<div class="newsbody">
<h1>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></h1>
<div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
<?php the_content(); ?>
<div class="feedback">
<?php wp_link_pages(); ?>
<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
</div>
<?php include(ABSPATH . 'wp-comments.php'); ?>
</div> <!-- end news div -->
<?php endforeach; else: ?>
<div class="newsbody">
<?php _e('Sorry, no posts matched your criteria.'); ?>
</div> <!-- end news div -->
<?php endif; ?>
If $cat is not set by anything then show_category_posts() doesn’t work at all. Any ideas are appreciated.
Thanks
-Ken