[resolved] Order my Posts (2 posts)

  1. sincewelastspoke
    Posted 4 years ago #


    I'm currently using the following to order my Posts in a WordPress page:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    						  $post_per_page = 100; // -1 shows all posts
    						  $do_not_show_stickies = 1; // 0 to show stickies
    						  $args=array('category__in' => array($cat),'orderby' => 'date','order' => 'DESC','paged' => $paged,'posts_per_page' => $post_per_page,'caller_get_posts' => $do_not_show_stickies);
    						  $temp = $wp_query;  // assign orginal query to temp variable for later use
    						  $wp_query = null;
    						  $wp_query = new WP_Query($args);

    However, what I'd like to do is show 4 specific posts initially and then show the rest in any order.

    Is this possible, and if so how do I do this with my code above?

    Many thanks

  2. sincewelastspoke
    Posted 4 years ago #

    Never mind.

    I added a conditional statement to change the $args based on the page id.

Topic Closed

This topic has been closed to new replies.

About this Topic