Is it possible to have the plugin not to modify links and keep them point to the non-AMP pages? So if a user lands to an AMP page and clicks any link, they should go to the original page rather than AMP.
@AlexeyKosov We already have this feature as options. Header link can be assigned to non-amp. Menus can be custom. Related posts have this as well.
If you could share the URL, then it would be better for me to understand and help you.
There are 2 versions of the blog:
As you can see, the AMP version of the blog has all the links pointed to respective AMP pages, but I'd like to have them redirected to the regular (non-AMP) version of the blog, similar to how https://amp.businessinsider.com/light-phone-2-cure-for-app-addiction-2018-2 works (all the links are non-AMP).
Let me know if it still doesn't make sense.
Hi @AlexeyKosov you meant to say that you need AMP Blog Post's to redirect them to their respecting Non-AMP page right? and on single pages such as this https://www.cadcrowd.com/blog/21-things-invented-by-famous-female-inventors/amp/ do you want the breadcrumb header and related posts to point to their non-AMP Version?
@Sejiro-Hiko
Exactly, I want to make all the links point to the non-AMP version of the site.
@AlexeyKosov I've added a filter in the above commit which will fulfill your requirement just pull this commit on your end and add the following code to your function.php of your theme or a child theme.
add_filter( 'ampforwp_non_amp_links', 'make_all_link_nonamp' );
function make_all_link_nonamp(){
$non_amp = true;
return $non_amp;
}
@Sejiro-Hiko
You're the man! Thanks
Awesome!
Viele Grüße,
Torben
—
Torben Simon Meier
Founder, Managing Director &
Chief Operating Officer
0049 251 1498 2001
[email protected]
raidboxes.de | WP-Magazin
Facebook | Twitter | Instagram
RAIDBOXES GmbH | Friedrich-Ebert-Straße 7 | 48153 Münster, DE
Geschäftsführer: Torben Simon Meier, Johannes Benz
HRB 16184 | Amtsgericht Münster | USt-IdNr. : DE306895091
On 20. Apr 2018, 12:58 +0200, Sejiro-Hiko notifications@github.com, wrote:
@AlexeyKosov I've added a filter in the above commit which will fulfill your requirement just pull this commit on your end and add the following code to your function.php of your theme or a child theme.
add_filter( 'ampforwp_non_amp_links', 'make_all_link_nonamp' ); function make_all_link_nonamp(){ $non_amp = true; return $non_amp; }
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.