688 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
_rg_ says

Anybody knows how to do this:?

I have for example this query:
$home_query = array(
    'posts_per_page' => $home_1_posts,
    'cat' => $home_1_cats_in,
    'category__not_in' => $home_1_cats_out,
    'tag__in' => $home_1_tags_in,
    'tag__not_in' => $home_1_tags_out
    );

query_posts($home_query_area_1);

I know how to concatenate the $query_string using, let´s say:

global $query_string;
query_posts( $query_string."&.orderby=");

That in order to use the pre-existing query args and only mixed with new ones…

But, how can i use the $query_string or similar, if using $args (as my first code) to the query_post ? I need to make the loop keeping for example the post_count value….

688 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
_rg_ says

To be more clear, let´s say you have this situation, where each loop is independent and reset count once finished:

LOOP #1 : post count 1, 2, 3

LOOP #2 : post count 1, 2, 3

LOOP #3 : post count 1, 2, 3

Into each loop you can select diferent cats, ok, but, what if you use same cats and then the post count needs to be (that´s what i´m trying) this way:

LOOP #1 : post count 1, 2, 3

LOOP #2 : post count 4, 5, 6

LOOP #3 : post count 7, 8, 9…

any idea will be great!

688 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
_rg_ says

nevermind:

global $wp_query;
query_posts(
    array_merge(
        array('cat' => 1),
        $wp_query->query
    )
);

:)

by
by
by
by
by
by