ap_get_questions( array $args = array() )
Description #
Get questions query.
Parameters #
- $argsarray (Optional) WP_Query arguments. Default value: array()
Source #
File: includes/question-loop.php
function ap_get_questions( $args = array() ) { if ( is_front_page() ) { $paged = (int) ap_sanitize_unslash( 'ap_paged', 'g', 1 ); } else { $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; } if ( ! isset( $args['post_parent'] ) ) { $args['post_parent'] = get_query_var( 'parent' ) ? get_query_var( 'parent' ) : false; } $args = wp_parse_args( $args, array( 'showposts' => ap_opt( 'question_per_page' ), 'paged' => $paged, 'ap_query' => 'featured_post', ) ); return new Question_Query( $args ); }
Expand full source code Collapse full source code View on GitHub: includes/question-loop.php:25
Add your comment