Deprecated

This method has been deprecated.

Categories::page_title( string $title )

Description #

Add category page title.

Parameters #

  • $title
    string (Required) AnsPress page title.

Changelog #

VersionDescription
4.1.1Introduced.

Source #

File: addons/categories/categories.php

	public function page_title( $title ) {
		if ( is_question_categories() ) {
			$title = ap_opt( 'categories_page_title' );
		} elseif ( is_question_category() ) {
			$category = get_queried_object();

			if ( $category ) {
				$title = $category->name;
			} else {
				$title = __( 'No matching category found', 'anspress-question-answer' );
			}
		}

		return $title;
	}

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