Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Magazine Styled Category Archive Pages WordPress

  • REFUNDED

I need some help with a 3 magazine theme archive pages. The scenarios and layouts is below. Please help me figure out what the best and most efficient way is to do this. Thanks!

The layout has 2 div columns (left and right).

<strong>LAYOUT 1</strong>

[[LINK href="http://img850.imageshack.us/img850/2149/archive1.jpg"]]Layout 1[[/LINK]]

<strong>Green Area</strong>

Display the most recent post in category that has as image attached. I already have a theme function that checks this - getImg($post_id).

<strong>Blue Area</strong>

Display the three most recent posts in category with or without image attached but exclude the post displayed in the GREEN AREA. The first post with a different class.

<strong>Yellow Area</strong>

Continuation of BLUE AREA. The next post.

<strong>Red Area</strong>

Display the rest of the posts in category

-------------------------------------------------------------------------------

<strong>LAYOUT 2</strong>

[[LINK href="http://img859.imageshack.us/img859/4673/layout2.jpg"]]Layout 2[[/LINK]]

<strong>Blue Area</strong>

Display the two most recent posts in category. The first post with a different class.

<strong>Green Area</strong>

Display the most recent post in category that has as image attached. I already have a theme function that checks this - getImg($post_id). Exclude the posts displayed in the BLUE AREA.

<strong>Red Area</strong>

Display the next posts in category that has as image attached. I already have a theme function that checks this - getImg($post_id).

<strong>Yellow Area</strong>

Display the rest of the posts in category

-------------------------------------------------------------------------------

<strong>LAYOUT 3</strong>

[[LINK href="http://img84.imageshack.us/img84/8992/layout3z.jpg"]]Layout 3[[/LINK]]


<strong>Yellow Area</strong>

Display the most recent post in category that has as image attached. I already have a theme function that checks this - getImg($post_id).

<strong>Red Area</strong>

Display the five most recent posts in category with or without image attached but exclude the post displayed in the RED AREA.

<strong>Blue Area</strong>

Display the rest of the posts in category

Answers (2)

2011-05-11

Kristin Falkner answers:

For the last example, or really modifying for any, it would be something like:

YELLOW AREA:

<?php $my_query = new WP_Query('cat=catID#here&showposts=1&whatever other info for your theme custom function to check if a post follows that'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate[] = $post->ID; ?>

/*FORMATTING OF YELLOW AREA*/

<?php endwhile; ?>


RED AREA:

<?php query_posts('showposts=5'); ?>

<?php if (have_posts()) : while (have_posts()) : the_post(); if( in_array($post->ID, $do_not_duplicate) ) continue; ?>

/* FORMATTING OF RED AREA */

<?php endwhile; endif; ?>


BLUE AREA:

<?php query_posts('cat=catID#here'); ?>

<?php if (have_posts()) : while (have_posts()) : the_post(); if( in_array($post->ID, $do_not_duplicate) ) continue; ?>

/* formatting of blue area */

<?php endwhile; endif; ?>

2011-05-12

Just Me answers:

If you are looking for the coding and styling of all of these scenarios then this is more like a job than a help question.

Best way would be to create a template page for each category.


Rodrigo F comments:

I think you're right. I will post like a job.