Multilingual website with qTranslate X
-
Hi,
I’m using your astonishing plugin, but I was lacking capacity to complain google rel=”alternate” demands.
So I added this portion of code to feed-sitemap-post_type.php
~ line 22 $enabled_languages = get_option('qtranslate_enabled_languages'); // AG: ... ~ line 54-66 $thisUrl = esc_url( get_permalink() ); // AG: ?> <url> <loc><?php echo $thisUrl; // AG: ?></loc> <?php for ($lngCnt=1; $lngCnt<count($enabled_languages); $lngCnt++) { // AG: ?> <xhtml:link rel="alternative" hreflang="<?php echo $enabled_languages[$lngCnt]; ?>" href="<?php echo qtranxf_convertURL($thisUrl, $enabled_languages[$lngCnt]); ?>"/> <?php } // AG: ?>
Now it generates alternate links as google wants to see.
Reference manual here.I’m not too deep into MVC programming, so I did temporary workaround. It would be pleasure if you could add such ability to whole plugin in your professional way.
Thank you in advance.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Multilingual website with qTranslate X’ is closed to new replies.