Answers for "query lastet wp"

PHP
0

none

<?php

    // The Query
    $next_args = array(
                    'post_type' => '<your_post_type>',
                    'post_status' => 'publish',
                    'posts_per_page'=>2,
                    'order'=>'DESC',
                    'orderby'=>'ID',
                    );

    $the_query = new WP_Query( $args );

    // The Loop
    if ( $the_query->have_posts() ) {
        $not_in_next_three = array();
        while ( $the_query->have_posts() ) {
            $the_query->the_post();
            //your html here for latest 2
            $not_in_next_three
Posted by: Guest on January-01-1970

Browse Popular Code Answers by Language