Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
fix(amp): don't include amphtml in attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
luisherranz authored Aug 26, 2019
1 parent 09375d8 commit 6c7bfac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/class-frontity-amp.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function check_if_should_inject()
$excluded = Frontity_Request::get('excluded');

$this->should_inject = $amp_forced
|| ($amp_active && is_single() && !$excluded);
|| ($amp_active && is_single() && !is_attachment() && !$excluded);
}

// Generates the string with the AMP canonical link.
Expand All @@ -39,4 +39,4 @@ function inject_header_html()
if ($this->should_inject)
echo $this->link_string;
}
}
}

0 comments on commit 6c7bfac

Please sign in to comment.