AnsPress_Tag::tag_page()

Description #

Tag page layout.

Changelog #

VersionDescription
4.1.0Introduced.

Source #

File: addons/free/tag.php

	public static function tag_page() {
		global $question_tag;
		$question_tag = get_queried_object();

		$question_args = array(
			'paged'      => max( 1, get_query_var( 'ap_paged' ) ),
			'tax_query'  => array(
				array(
					'taxonomy' => 'question_tag',
					'field'    => 'id',
					'terms'    => array( $question_tag->term_id ),
				),
			),
		);

		$question_args = apply_filters( 'ap_tag_question_query_args', $question_args );

		if ( $question_tag ) {
			anspress()->questions = ap_get_questions( $question_args );
			include( ap_get_theme_location( 'addons/tag/tag.php' ) );
		}

	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment