I hope i can explain this right , what im trying to do is use the default word press loop to show all my posts etc.. but for the first post I would like it to be styled completely different depending on what parent category it was published in, so there would be a lot going on in that first post.
Right now I'm some what achieving this by using 2 loops that both pull from the default, the first loop is my "new / Featured" post area and is set to posts_per_page=1 , then the second loop is your standard loop, but the issue I'm having is obviously it shows duplicate posts, now i tried offset=1 on the second loop but then my pagination does not work, any help or direction would be awesome, I know its a lot sorry. below is my code for both loops and a link to my testing site thanks!
1st (new / featured) loop :
<?php $custom_query = new WP_Query('posts_per_page=1');
while($custom_query->have_posts()) : $custom_query->the_post(); ?>
<?php
$parent_cat = array();
$post_cats = get_the_category($post->ID);
foreach( $post_cats as $post_cat ) {
if( $post_cat->parent ) $parent_cat[] = get_category( $post_cat->parent )->slug;
}
?>
<!--CONTENT HERE-->
<?php endwhile; ?>
<?php wp_reset_postdata(); // reset the query ?>
<?php } else { ?>
2nd (Standard) loop:
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<!--CONTENT HERE-->
<?php endwhile; else: ?>
<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php endif; ?>
Here is a link to the dev site were you can see what im talking about http://themes.thefragilemachine.com/gone/
thanks for any help!