AnsPress_Category::category_page()
Description #
Category page layout.
Source #
File: addons/free/category.php
public static function category_page() {
$question_args = array(
'tax_query' => array(
array(
'taxonomy' => 'question_category',
'field' => 'id',
'terms' => array( get_queried_object_id() ),
),
),
);
$question_category = get_queried_object();
if ( $question_category ) {
anspress()->questions = ap_get_questions( $question_args );
/**
* This action can be used to show custom message before category page.
*
* @param object $question_category Current question category.
* @since 1.4.2
*/
do_action( 'ap_before_category_page', $question_category );
include( ap_get_theme_location( 'addons/category/single-category.php' ) );
}
}
Expand full source code Collapse full source code View on GitHub: addons/free/category.php:86
Add your comment