Answers for "how to use is_archive() in wordpress"

PHP
1

wordpress is_archive

// 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' )){ /* */ }
Posted by: Guest on October-21-2020

Code answers related to "how to use is_archive() in wordpress"

Browse Popular Code Answers by Language