Wordpress category post display help
I've been all over the place trying to find help on a project i'm working on right now. Hopefully I can get some help here...Basically, on my wordpress based retail site (le-raq.com/site), I wanted a set of tabs to display posts from a specific category in the main post section. If you take a look, there are three tabs/links, "All, Men, Women". The "All" tab is supposed to load all posts regardless of category, the "Men" tab loads all posts from the category Men, etc etc...
Now, I was using a javascript code that allows you to display different content within a DIV on the same page when a link was clicked on...I tried to apply it to this sitaution for the desired effect, but got an 500 error...i'm not PHP expert, but I assume there is a conflict with the way I assembled the code, and an argument with all the post loops...I'll attach the code I was trying to use... can someone tell me where I went wrong?
Heres the code:
<?php get_header(); ?>
<div class="home fix" style="padding: 4px;">
<div class="left">
<DIV><H1>FILTER SALES BY: <a href="#" onclick="show_visibility('all')">ALL</a> | <a href="#" onclick="show_visibility('men')">MEN</a> | <a href="#" onclick="show_visibility('women')">WOMEN</a></H1></DIV>
<div id='lnks'>
<div class="recent-leads fix">
<!--first-->
<div id='all' style="display: block;">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="<?php echo ( is_first_post($post->ID) ) ? 'main-post-bg' : 'secondary-post-bg left'; ?>">
<p class="post-comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
<?php if ( is_first_post($post->ID) ) $img_src = get_post_meta($post->ID, 'lead_image', true);
else $img_src = get_post_meta($post->ID, 'secondary_image', true);
if ( $img_src == '' ) $img_src = '/wp-content/themes/theunstandard/images/theunstandard-blank.png';
?>
<?php include (TEMPLATEPATH . '/includes/index_dynamic.php'); ?>
<div class="title-insert">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
<?wp_reset_query(); ?>
</div>
<!--end first part-->
<!--second-->
<div id='men' style="display: none;">
<?php query_posts('category_name=men&showposts=10'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="<?php echo ( is_first_post($post->ID) ) ? 'main-post-bg' : 'secondary-post-bg left'; ?>">
<p class="post-comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
<?php if ( is_first_post($post->ID) ) $img_src = get_post_meta($post->ID, 'lead_image', true);
else $img_src = get_post_meta($post->ID, 'secondary_image', true);
if ( $img_src == '' ) $img_src = '/wp-content/themes/theunstandard/images/theunstandard-blank.png';
?>
<?php include (TEMPLATEPATH . '/includes/index_dynamic.php'); ?>
<div class="title-insert">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
<?wp_reset_query(); ?>
</div>
<!--end second part-->
<!--third-->
<div id='women' style="display: none;">
<?php query_posts('category_name=women&showposts=10'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="<?php echo ( is_first_post($post->ID) ) ? 'main-post-bg' : 'secondary-post-bg left'; ?>">
<p class="post-comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
<?php if ( is_first_post($post->ID) ) $img_src = get_post_meta($post->ID, 'lead_image', true);
else $img_src = get_post_meta($post->ID, 'secondary_image', true);
if ( $img_src == '' ) $img_src = '/wp-content/themes/theunstandard/images/theunstandard-blank.png';
?>
<?php include (TEMPLATEPATH . '/includes/index_dynamic.php'); ?>
<div class="title-insert">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
<?wp_reset_query(); ?>
</div>
<!--end third part-->
<div class="entry navigation radius-link fix">
<br class="clear" />
<p class="left"><?php previous_posts_link('« previous'); ?></p><p class="right"><?php next_posts_link('next »'); ?></p>
</div>
<?php else : ?>
<div class="post single">
<h2>No matching results</h2>
<div class="entry">
<p>You seem to have found a mis-linked page or search query with no associated or related results.</p>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<div class="right">
<DIV><H1>COMING UP...</H1></DIV>
<?php include (TEMPLATEPATH . '/sidebar.php'); ?>
</div>
</div>
<?php get_footer(); ?> The javascript used is in the header (not included)...i think the JS is fine, but theres an issue with the way I have the PHP...
Please help!! Thanks!
The 2nd Amendment, 1789 - The Original Homeland Security.
Gun control means never having to say, "I missed you."
yes, I am....