[OFFER ALERT!] This Halloween, Get Any Premium Theme for Just $19 [GET IT NOW]
Jump to content

cbstudiomx

Member
  • Posts

    23
  • Joined

  • Last visited

cbstudiomx's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 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(); });
  2. 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 ,
  3. 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.
  4. I found this issue on the canonical URL declaration. Google says that a normal page needs to have a canonical URL to itself. Also need to have an amp html page meta information. But, on the AMP page, the canonical URL doesn't have to be self page, but the normal page.
×
×
  • Create New...