Skip to content

Commit

Permalink
fixed #335
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaled Mohammed committed Jan 3, 2017
1 parent 5b4c77f commit ad44924
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/features.php
Expand Up @@ -74,7 +74,9 @@ function ampforwp_home_archive_rel_canonical() {
return;
}
if ( is_home() || is_front_page() ){
$amp_url = home_url('/?amp');
global $wp;
$current_archive_url = home_url( $wp->request );
$amp_url = trailingslashit($current_archive_url).'?amp';
}
else {
$amp_url = amp_get_permalink( get_queried_object_id() );
Expand Down

0 comments on commit ad44924

Please sign in to comment.