AnsPress_Theme::page_template( string $template )

Description #

Override page templates.

Parameters #

  • $template
    string (Required) Current template.

Changelog #

VersionDescription
4.1.0Introduced.

Source #

File: includes/class-theme.php

	public static function page_template( $template ){
		if ( is_search() && 'question' === get_query_var( 'post_type' ) ) {
			return locate_template( 'page.php' );
		}
		return $template;
	}

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