Structured Data in AMP

#3958
Viewing 15 replies - 16 through 30 (of 32 total)
  • Andrey
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Andrey
    Rank Math free

    Hello.
    I updated the link.

    Hello,

    I logged into your site and I added below code in your theme’s functions.php file:

    
    /**
     * Only load if Rank Math plugin is activated
     */
    if ( defined( 'RANK_MATH_FILE' ) && 'layout' === get_option( 'show_on_front' ) ) {
    
        /**
         * Adjusting homepage's title tag
         * @return string
         */
            function extra_rank_math_homepage_title_adjustment( $title ) {
                if ( is_home() ) {
                    $title = RankMath\Helper::replace_vars( RankMath\Helper::get_settings( 'titles.homepage_title' ) );
                }
                return $title;
            }
            add_filter( 'rank_math/frontend/title', 'extra_rank_math_homepage_title_adjustment', 16 );
    
            /**
             * Adjusting homepage's meta description
             * @return string
             */
            add_filter( 'rank_math/frontend/description', function( $description ) {
                if ( is_home() ) {
                    $description = RankMath\Helper::replace_vars( RankMath\Helper::get_settings( 'titles.homepage_description' ) );
                }
                return $description;
            });
    
            /**
             * Adjusting homepage's robots
             * @return string
             */
            add_filter( 'rank_math/frontend/robots', function( $robots ) {
                if ( is_home() && RankMath\Helper::get_settings( 'titles.homepage_custom_robots' ) ) {
                    $robots = RankMath\Helper::get_settings( 'titles.homepage_robots' );
                    if ( ! is_array( $robots ) || ! in_array( 'noindex', $robots ) ) {
                        $robots['index'] = 'index';
                    }
                    if ( ! is_array( $robots ) || ! in_array( 'nofollow', $robots ) ) {
                        $robots['follow'] = 'follow';
                    }
                }
                return $robots;
            });
    }
    

    All the data is now showing on the homepage. Can you please confirm?

    Thank you.

    Andrey
    Rank Math free

    Hello.
    Sorry, but could not write before. I saw your code and all the data were output, but when I updated the plugin to the latest version, “description” is not displayed. Look here please. And thank you for your work.

    Andrey
    Rank Math free

    Hello.
    Earlier, I wrote about a warning when checking AMP pages. When I check the structured data on the main page, I see that BlogPosting is displayed
    https://drive.google.com/file/d/1LFrKrywqIKef3_5xFvtVLaoPVdlseJSa/view?usp=sharing
    BlogPosting is also displayed on post pages.
    https://drive.google.com/file/d/1h4c7ScuJXt9V5qBbajvBoByrvJpNJL8d/view?usp=sharing
    And on the pages of the categories Article is displayed
    https://drive.google.com/file/d/1l36vES2zjIyync1zTxNWHo-5yc8ID7j0/view?usp=sharing
    Of course, I don’t understand much, but I tried to disable Rank Math and all pages are checked by AMP pages without warnings. When the Rank Math plugin is disabled, the Accelerated Mobile Pages plugin displays its markup on the pages of categories, in which BlogPosting is displayed. But disabling Rank Math is not the answer. How can I make RankPath appear on BlogPosting pages instead of Article on the Rank Math categories pages
    https://drive.google.com/file/d/1OcK7Dat29UHvWyNWMFp40677iU4hILqx/view?usp=sharing
    Maybe this will help pass the test without errors.

    Hello,

    Please add below code in your theme’s functions.php file to change the partType on category pages:

    
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    
        if ( isset( $data['CollectionPage'] ) && ! empty( $data['CollectionPage']['hasPart'] ) ) {
            foreach( $data['CollectionPage']['hasPart'] as $key => $part ) {
                $data['CollectionPage']['hasPart'][$key]['@type'] = 'BlogPosting';
            }
        }
        return $data;
    }, 20, 2);
    

    Although, I don’t think plugin is causing any issues on the AMP pages. Even after deactivating the Rank Math plugin on your site the AMP Test tool is giving the warning Page Cannot be reached. Are you sure, you are not blocking AMP pages from robots.txt file?

    Looking forward to helping you. Thank you.

    Andrey
    Rank Math free

    Hello.
    Thanks for the help, but it did not solve the problem.
    This is a test site on which I check the performance of plug-ins. On the main site, Rank Math is installed with the same settings. I don’t know why, but when I check AMP pages, I get a warning
    https://search.google.com/test/amp?id=vbotFi42NbNLYIvg1_c_OA
    I wrote in support of Accelerated Mobile Pages, but they can’t say anything there either.
    Anyway, thanks for the help.

    Hello,

    I see Rank Math plugin is not active on the live site now. To me, it looks like some other plugin is conflicting with the Rank Math as we’ve thoroughly tested our plugin with the AMP.
    Would it be possible to add admin access to live site in the Sensitive Data Section? Or can you create a copy of your live site on staging environment? Currently, AMP Testing tool could not access the staging site.

    Looking forward to helping you. Thank you.

    Andrey
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Andrey
    Rank Math free

    Hello.
    I updated my login details yesterday. Have you watched what could be the problem?
    Thank.

    Hi Andrey,

    We are looking into this and we will be getting back to you shortly.

    Your continued patience is highly appreciated.

    Andrey
    Rank Math free

    Hello.
    I’m not rushing you. I just thought you didn’t notice the access update.
    Please also see how you can add compatibility with the Extra theme in the following updates so that Rank Math displays all the data on the main page. At the moment I am displaying “description” and “link rel = canonical” with the Extra theme, but on the main AMP page, the Extra “description” theme does not display.
    And further. When you check the AMP categories page and look at the preview of the search results, the name of the last entry is displayed instead of the category name and the wrong “description”.
    Thank.

    Hello,

    I logged into your site and I added below code in your theme’s functions.php file to remove BreadcrumbList schema from the homepage.

    
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	if ( is_home() && isset( $data['BreadcrumbList'] ) && function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
    		unset( $data['BreadcrumbList'] );
      }
    
      return $data;
    }, 99, 2);
    

    The Structured data testing tool, doesn’t show any errors now (please see the link I added in the Sensitive Data Section).
    The issue is neither in the Rank Math plugin nor in the AMP. The Extra theme uses an additional layout for the homepage which is causing the problem. To fix these issues, you’ll have to contact the theme author and ask them to make their theme compatible with Rank Math, just like they are doing it for the Yoast plugin.

    When you check the AMP categories page and look at the preview of the search results, the name of the last entry is displayed instead of the category name and the wrong “description”.

    Can you please explain this issue. Are you seeing the wrong data in Google preview? If you’ve recently updated this data, then Google probably hasn’t indexed the new description yet. It can take up to a week for Google to index the changes you made, depending on how often your website is crawled. If you type, in Google, cache: followed immediately by the URL of your site or page, you’ll see what Google has cached for your site. If the appeared date is before you made the changes, you’ll have to wait for Google to crawl your site again.

    Hope that helps. Please let us know if there is anything else.

    Thank you.

    Andrey
    Rank Math free

    Hello.
    I can already see that you added the code and it solved one problem. Thanks you.
    At your request, I will try to describe the problem in more detail. When I check the main page and categories, I see a warning:
    Structured data element is invalid or missing
    The required structured data property is missing, invalid, or invalid.
    https://drive.google.com/file/d/1m3Zaa3kFvaUb5EpDI7F-NY90aDvRbUcG/view?usp=sharing
    When I turn to look in the search
    https://drive.google.com/file/d/1ZRMoXktZ9bG8CjzEm8YsEH9eyEtfdiOj/view?usp=sharing
    I see
    https://drive.google.com/file/d/1dySMxT3b1mVZJP5TEuwRjI3_AsCJ4ZxF/view?usp=sharing
    but this is not the name of the page with the description, but the name of the last entry with an unacceptable description
    This I gave an example of the main page. On the category pages, too, this problem. Record pages are checked without errors and warnings.
    https://drive.google.com/file/d/1zYwTSwFc8rGy_cw6Np37qLhV2VxpAjRH/view?usp=sharing
    View in search
    https://drive.google.com/file/d/1UYnvKZb9VVKFtsdtM5nTRnyb72a9NEvw/view?usp=sharing
    Here is the correct name, and the description is not what I added to Rank Math. Although there are no warnings.
    Look here please.
    Thank.

    Todd
    Rank Math free

    Hi Andrey,

    If I’m understanding you correctly, you are worried the description entered in the plugin is different from what’s entered in the plugin.

    Please check if your actual SEO meta description matches the one you have set using Rank Math.

    You can confirm the same by opening the post and then following this image tutorial

    https://mythemeshop.d.pr/ePhMiA

    Once the source is opened, search for the word <meta descriotion= and you can confirm if the description is the same as you entered in the plugin.

    If it matches as seen in the HTML source code there is nothing to worry about. Google sometimes does not honor your meta description and displays them as per their will.

    You can go through this post on Google Search Console support section: https://support.google.com/webmasters/answer/35624?hl=en

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

Viewing 15 replies - 16 through 30 (of 32 total)

The ticket ‘Structured Data in AMP’ is closed to new replies.