Images from posts and pages are at “1”

#47948
  • Resolved Arthur
    Rank Math free

    Hi, I was setting this up after Yoast and it seems that I have lost my images on a page and post sitemaps.

    Please advice

    • This topic was modified 3 years, 10 months ago by Arthur.
Viewing 15 replies - 1 through 15 (of 42 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    It looks like you have already switched back to Yoast. Could you please let us know the page builder that you are currently using?

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello Michael,

    I use WPBakery Page Builder. I have switched back to RankMath now.

    thanks
    Arthur

    Hello Michael, just to add, when switched to other SEO plugin, the media count is showed on the sitemap.

    This was the case originally and it was ok when switched first to RankMath. But after messing up settings with adding “Attachment Sitemap”, I had disabled it and ever since Rank Math does not display amount of media in post/page sitemap anymore. So I wanted to do “clean” install and apparently some settings are not working properly, although I had ran the IMPORT form other SEO plugin again.

    Also, it seems that the score I get within a single post is very low and internal links not showing, although they are there and the SEO score was good on other Plugin.

    I have put back the other plugin for until I get clarity of how to fix this.

    I had clean uninstalled the RankMath Plugin, by adding code line into functions.php and ran setup wizard without importing setting from other plugin.

    Still this did not fix the issue of Image count not shown in sitemap. Only image was shown in sitemap was featured image, when this option enabled.

    I have also tried the solution below:

    https://notasusual.co/rank-math-wpbakery-sitemap-fix/

    This also did not work when put into my child theme functions.php

    Alberto
    Rank Math business

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

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

    Thank you.

    Hi Arthur,

    Thanks for the follow up.

    I am afraid that the password does not seem to be correct.

    Could you please check and update it?

    Thank you.

    Hello,

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

    Thank you.

    Hello,

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

    Thank you.

    Hello,

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

    Thank you.

    Todd
    Rank Math free

    Hi Arthur,

    Can you please add this code to the theme’s functions.php file?

    add_filter( 'rank_math/sitemap/urlimages', function( $images, $id ){
        if ( empty( $images ) ) {
            $post = get_post( $id );
            if ( $post && strpos( $post->post_content, '[vc_row' ) !== false ) {
                preg_match_all( '/(?:image|images|ids|include)\=\"([^\"]+)\"/', $post->post_content, $matches );
                foreach ( $matches[1] as $m ) {
                    $ids = explode( ',', $m );
                    foreach ( $ids as $id ) {
                        if ( (int) $id ) {
                            $images[] = array(
                                'src' => wp_get_attachment_url( $id ),
                                'title' => get_the_title( $id ),
                            );
                        }
                    }
                }
            }
        }
    
        return $images;
    }, 10, 2 );

    If it doesn’t work, please talk to WPBakery as we have already contacted them numerous times about adding this particular compatibility. Due to the nature of this issue, it needs to be “fixed” from their end just like they have done for other SEO plugins.

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

    HI guys, no – this code does not work when added to functions.php file in either the Child or Core theme.

    This is same solution you have been providing to other people and this does not seem to be resolved in many cases.

    Please advice if there is anything else that can be done?

    Did you manage to log in to check if the settings are ok?

    Hello,

    Thank you for contacting Rank Math today.

    I think the guys from WPBakery are in a better position to advise on how to tweak this code to be able to get image attachments from the page builder.
    Please reach out to their team so that they can advise further.

    Looking forward to helping you. Thank you.

    ​​​​​​

Viewing 15 replies - 1 through 15 (of 42 total)

You must be logged in to reply to this ticket.