Skip to content

Commit

Permalink
add extra no index rules. #256
Browse files Browse the repository at this point in the history
  • Loading branch information
spelkey-ucd committed Oct 2, 2023
1 parent 83ccb59 commit f7d3eda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion theme/includes/classes/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function __construct() {
* @description Adds noindex to 404 and search pages
*/
public function robots_noindex($robots){
if ( is_404() || is_search() ) {
if ( is_404() || is_search() || is_archive() || is_singular('attachment') ) {
$robots['noindex'] = true;
$robots['nofollow'] = true;
}
Expand Down

0 comments on commit f7d3eda

Please sign in to comment.