cbstudiomx
Member
-
Posts
23 -
Joined
-
Last visited
Content Type
Profiles
Forums
Tutorials
Everything posted by cbstudiomx
-
[Rank Math SEO Plugin] Referenced AMP URL is self-canonical AMP
cbstudiomx replied to cbstudiomx's topic in Rank Math Free
That code did not work for me, but I search in better amp plugin for a "better" function to call and I change your code, and this work for me: add_action( 'rank_math/frontend/canonical', function( $url ) { if ( ! is_singular() || ! is_category() || ! function_exists( 'better_amp_get_canonical_url' ) ) { $url = better_amp_guess_none_amp_url(); return $url; } $custom_url = RankMath\Post::get_meta( 'canonical_url', get_the_ID() ); if ( $custom_url ) { return $custom_url; } return better_amp_get_canonical_url(); }); -
On the AMP section Google point this worning: Error in required structured data element I check with Rich Results Tools and there it is: https://search.google.com/test/rich-results?id=PngkB55BKSg-mZU-U09Btg Invalid top level element 'string' 1 instance Line 156:361 "BlogPosting" And on the upper code he point here ...search_term_string"}},"BlogPosting",{"@context":"https:\/\/schema.org\/... I think after "BlogPosting" has to be : not ,
-
[Rank Math SEO Plugin] Referenced AMP URL is self-canonical AMP
cbstudiomx replied to cbstudiomx's topic in Rank Math Free
Hello, We use Better AMP v1.9.10 In the htmp code of the generated post or page, the canonical URL is declared by Rank Math! I think the rule has to be simple and you have to put it in to a next update: if page si AMP, canonical URL has to be the parent page else, use the actual page. Referenced AMP URL is self-canonical AMP The canonical page points to a stand-alone AMP. You cannot reference a stand-alone AMP as the AMP version of a page. Learn how to reference an AMP from a non-AMP page.