Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Non Amp URL

$
0
0

Replies: 0

Hi

I want to add non-amp url


$current_url = amp_get_current_url();
	
	$nonAMPURL = amp_remove_endpoint( $current_url );
	
	
	if ( $nonAMPURL ) { ?>
	
	<a class="view-non-amp" href="<?php echo  esc_url($nonAMPURL) ?>">View Non-AMP Version</a> <?php
	}

but it still print amp url.

also can we rewrite ?amp to /amp.


Viewing all articles
Browse latest Browse all 59525

Trending Articles