FAQ Query
This is a test query for an FAQ Archive Page
// WP_Query arguments
$args = array(
'post_type' => array( 'faqs' ),
'post_status' => array( 'published' ),
'has_password' => false,
'nopaging' => false,
'posts_per_page' => '1',
'posts_per_archive_page' => '2',
'ignore_sticky_posts' => true,
'order' => 'DESC',
'orderby' => 'title',
);
// The Query
$questions = new WP_Query( $args );
// The Loop
if ( $questions->have_posts() ) {
while ( $questions->have_posts() ) {
$questions->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();