Error with AMP url
-
Hi,
With the AMP Official plugin installed, when you try to update a post which has a custom permalinks url, the plugin “custom permalinks” creates a “double permalink url” with a new type “Amp_validated_url”. When you try to access to that post, it redirects to the main page. The only solution is to delete manually that new permalink (type: Amp_validated_url) created.
I have tried to add this code to avoid the new “false” permalink to be created:
“function yasglobal_exclude_post_types( $post_type ) {
if ( $post_type == ‘Amp_validated_url’ ) {
return ‘__true’;
}
return ‘__false’;
}
add_filter( ‘custom_permalinks_exclude_post_type’, ‘yasglobal_exclude_post_types’);”But it doesn’t work.
Thanks for your support.
- The topic ‘Error with AMP url’ is closed to new replies.