This topic has 10 replies, 2 voices, and was last updated 8 years, 9 months ago ago by Jack Richardson
Hi there,
Currently Google is indexing my website under url.com/nl and url.com/nl/ because the code of the logo is not WPML compliant, see : https://wpml.org/wpml-hook/wpml_home_url/
I looked at the theme and found this in theme-functions.php:
<?php if($logoimg): ?>
<a href="<?php echo home_url(); ?>"><img src="<?php echo $logoimg ?>" alt="<?php bloginfo( 'description' ); ?>" /></a>
<?php else: ?>
<a href="<?php echo home_url(); ?>"><img src="<?php echo PARENT_URL.'/images/logo.png'; ?>" alt="<?php bloginfo('name'); ?>"></a>
<?php endif ;
do_action('etheme_after_logo');
}
I have no idea how to fix this, please help me out!
Hello,
Please provide us with WP dashboard and FTP (FTP host, FTP user, FTP password) credentials in private content.
Best regards,
Jack Richardson.
Hi Jack,
Thank you for replying. You can find the info below:
Hello,
As you can see in the WPML documentation you provided https://wpml.org/wpml-hook/wpml_home_url/
* Note: Good code will make use of get_home_url() or home_url() which apply filters natively. In this case there is no need to replace anything.
And there is in the part of code from theme-functions.php home_url() function is used.
Best regards,
Jack Richardson.
But somehow the link to the logo is not correct and thus linking it to /language instead of /language/
Hello,
Then try to change the following lines of code you provided in your first post
<a href="<?php echo home_url(); ?>"><img src="<?php echo $logoimg ?>" alt="<?php bloginfo( 'description' ); ?>" /></a>
<?php else: ?>
<a href="<?php echo home_url(); ?>"><img src="<?php echo PARENT_URL.'/images/logo.png'; ?>" alt="<?php bloginfo('name'); ?>"></a>
to
<a href="<?php echo home_url('/'); ?>"><img src="<?php echo $logoimg ?>" alt="<?php bloginfo( 'description' ); ?>" /></a>
<?php else: ?>
<a href="<?php echo home_url('/'); ?>"><img src="<?php echo PARENT_URL.'/images/logo.png'; ?>" alt="<?php bloginfo('name'); ?>"></a>
Best regards,
Jack Richardson.
Hi Jack,
That didn’t solve the issue, still links to site.com/nl instead of site.com/nl/
Hello,
I’ve pasted needed part of code with changes to the wp-content/themes/royal-child/functions.php file.
Please clear browser cache and check the site.
Best regards,
Jack Richardson.
Great Jack, thank you!
Hello,
You’re welcome.
We’d be thankful if you leave a comment on ThemeForest site http://themeforest.net/item/royal-multipurpose-wordpress-theme/8611976/comments .
Thank you.
Best regards,
Jack Richardson.
Tagged: correct, header url, themes, woocommerce, wordpress, wpml
The issue related to '‘WPML Header URL Not Correct’' has been successfully resolved, and the topic is now closed for further responses