og:url tag is not there, all other tags are there

#624889
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

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

    Assuming you are using the latest version of all the plugins and the themes (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Here is a video you can follow as well:

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    If the issue persists, please try using this filter code:

    add_filter( 'rank_math/opengraph/facebook/og_url', function( $url ) {
    	if(!filter_var($url, FILTER_VALIDATE_URL)){
    		global $wp;
    		$url = home_url( add_query_arg( array(), $wp->request ) ) . '/';
    	}
    	return $url;
    });

    You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

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

    Anonymous
    Rank Math free

    I disabled all the plugins but OG:URL still didn’t show

    Hello,

    Thank you for getting back to us.

    To help you investigate this issue, we might need to take a closer look at your website and settings. Please follow these steps:

    • Edit the first post on this ticket and include your WordPress and FTP logins in the Sensitive Data section. This is a secure section that only our support staff can access.
      Sensitive Data Section
    • Make sure you take a complete backup of your website before sharing the information with us.
    • If you prefer, you can use this 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 also use this plugin to monitor what changes our staff might make on your website (if any): https://wordpress.org/plugins/wp-security-audit-log/

    We appreciate your cooperation and patience. Thank you for choosing Rank Math.

    Anonymous
    Rank Math free

    I have added filter code that you have advised and I think, it have solved the issue.
    Please check below code I found in source code
    [moved to sensitive data section]

    Hello,

    In this case, you just need to remove the additional trailing slash from the filter:

    add_filter( 'rank_math/opengraph/facebook/og_url', function( $url ) {
    	if(!filter_var($url, FILTER_VALIDATE_URL)){
    		global $wp;
    		$url = home_url( add_query_arg( array(), $wp->request ) );
    	}
    	return $url;
    });
    

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    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 ‘og:url tag is not there, all other tags are there’ is closed to new replies.