📅  最后修改于: 2022-03-11 14:54:32.185000             🧑  作者: Mango
// Returns true if wordpress is on an archive page
is_archive(); // For posts only
is_post_type_archive( $post_types ); // For a specific post type
// example: if (is_post_type_archive( 'news' )){ /* */ }