Vai al contenuto Vai alla barra laterale

Open

Reported for: WPML SEO 2.1.1

Topic Tags: Compatibility

Overview of the issue

When using Yoast SEO, the plugin automatically adds Open Graph meta tags to the head section of author archive pages. However, on translated author archive pages, the og:url meta tag will display the URL in the default language.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open your theme’s functions.php file.
    /**
     * Workaround to fix og:url meta tag on translations of author archives
     */
    add_filter( 'wpseo_opengraph_url', function($url, $presentation){
    
    	if ( $presentation instanceof YoastWPSEOPresentationsIndexable_Author_Archive_Presentation ){
    		$user_id = $presentation->source['post_author'];
    		$url = rawurlencode( get_author_posts_url($user_id) );
    	}
    
    	return $url;
    }, 10, 2 );
            

4 risposte a “Yoast SEO - Incorrect og:url Meta Tag on Translated Author Archives”

  1. Hola no puedo actualizar a WMPL SEO 2.2.1 porque no me sale la opcion por ningun lado y no puedo resolver el problema. Sigo teniendo la version 2.1.1, puede ser que esto no me deja resolverlo? Como hago para poder actualizarlo?

    • Hi there,

      Thanks for reaching out! You can download the latest version of WPML SEO here (just make sure you’re logged into your WPML account to access it).
      If you run into any issues during the process, feel free to open a chat with our support team. We’re happy to help!

  2. WPML Media is intstalled but showing not installed under the Support Page:

    WPML Media shows not installed under the Support Page, even thou the plugin is installed.

    I am using wpBakery – Media Grid (photo gallery) is showing in the Front End Editor, but is not showing is the Front End in some translated pages.

    I have deactivated and deleted all WPML plugins (and modules) and made new fresh clean installed. It didn’t solve the issue.

    • Hi Fabrice,

      Thanks for your feedback. We’re aware that some add-ons, like Media Translation, may appear as not installed under WPML > Support, even though they are. Our developers are currently working on resolving this.

      As for the WPBakery Media Grid issue, it should have already been fixed in this commit. If you’re still experiencing issues, please start a chat on our support forum, our team will be happy to assist you.

Lascia una risposta

Per favore rimani in tema e sii rispettoso verso gli altri. Se hai bisogno di aiuto con problemi non relativi a questo post, usa il nostro Forum di Supporto per iniziare una chat o inviare un ticket.

Puoi usare questi tag:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>