is_page_template not working as expected
It looks like you’re checking if you’re on the mobile_photo post type archive with this line: <?php elseif ( is_page_template( ‘archive-mobile_photo.php’ ) ) : ?> If that’s indeed the case, use is_post_type_archive( $post_types ) instead: <?php elseif ( is_post_type_archive( ‘mobile_photo’ ) ) : ?>