post_type_archive_title

post_type_archive_title

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-7.0

apply_filters('post_type_archive_title') is found 2 times:

  • /wp-includes/blocks/breadcrumbs.php line 460
    		}
    		$post_type_object = get_post_type_object( $post_type );
    
    		/** This filter is documented in wp-includes/general-template.php */
    		$title = apply_filters( 'post_type_archive_title', $post_type_object->labels->archives, $post_type ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
    
    		if ( $post_type_object ) {
    			// Add post type (current if not paginated, link if paginated).
    			$breadcrumb_items[] = block_core_breadcrumbs_create_item(
    				$title ? $title : $post_type_object->labels->archives,
    				$is_paged
    
  • /wp-includes/general-template.php line 1549
    	 *
    	 * @param string $post_type_name Post type 'name' label.
    	 * @param string $post_type      Post type.
    	 */
    	$title = apply_filters( 'post_type_archive_title', $post_type_obj->labels->name, $post_type );
    
    	if ( $display ) {
    		echo $prefix . $title;
    	} else {
    		return $prefix . $title;
    	}
    

See this hook used in plugins: