WordPress判断是否指定文章类型归档页函数:is_post_type_archive
WordPress函数is_post_type_archive用于判断是否指定的文章类型归档页。 is_post_type_archive( string|string[] $post_types = '' ) 函数参数$post_types 字符串 指定文章类型 函数使用示例<?php if ( is_post_type_archive() ) { ?> <h1><?php post_type_archive_title(); ?></h1> <?php } ?> 扩展阅读is_post_type_archive()函数位于:wp-includes/query.php …



