Manually edit og:image:alt

#30658
  • Resolved 620 Studio
    Rank Math business

    I have a client who owns several websites that reference each others often based on industries. We noticed when adding a link using a TinyMCE editor, it will grab the destination page’s meta data to render out a better looking link.

    The issue is we name the page something different than what the page title actually is for internal uses, specifically those we use unique URL’s for so when looking at the page list we can identify the page quickly.

    The problem is the link is grabbing the og:image:alt as the page title along with the featured image and I’m not seeing any way to adjust this. Doing a quick test, changing the page title does change the og:image:alt. Is there a particular reason why this meta tag isn’t following the RankMath snippet editor? I can’t see a reason why it would use the WP page title when the Snippet editor has been modified. Bug, perhaps?

    Thanks for your help!

    • This topic was modified 4 years, 8 months ago by 620 Studio.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

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

    It is likely that you have enabled the option to automatically assign missing ALT attributes. The default value will be generated from %title% %count(alt)%

    You can modify this setting by heading over to Rank Math > General Settings > Images as shown below:
    Screenshot

    Looking forward to helping you. Thank you.

    ​​​​​​​

    620 Studio
    Rank Math business

    Hi Michael,
    Thanks for the response, however the Add missing ALT attributes is turned off for this site.

    If you want to see source you can go to: http://www.futuremoneytrends.com/gold and you’ll see in the meta area created by Rank Math, the property og:image:type is using the WP title as opposed to the title we’re adding manually in Rank Math’s Snippit Editor. Doing a search through the code only brings up two references to “LP(L) /gold”, once in the meta and the second in our MailChimp merge tagging.

    Usually this wouldn’t be an issue except for WP is wanting to draw info from an external source when linking to an external site.

    You can see the problem here when I copy/paste the two website’s page into WP’s content editor: https://www.shtfplan.com/test-page

    Hopefully this gives more detail

    Hello,

    Thank you for the reply.

    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.

    620 Studio
    Rank Math business

    Hello,

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

    Thank you.

    Hello,

    You can use the following filter to change the opengraph values: https://rankmath.com/kb/filters-hooks-api-developer/#change-specific-social-meta

    Here is a sample code, to add SEO Title in the og:image_alt instead of the page title:

    
    add_filter( 'rank_math/opengraph/facebook/og_image_alt', function( $title ) {
    	global $post;
    	$seo_title = get_post_meta( $post->ID, 'rank_math_title', true );
    	return $seo_title ? $seo_title : $title;
    });
    
    

    I hope that helps. If there is anything else, please let us know.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Manually edit og:image:alt’ is closed to new replies.