Please make sure to update to WPML 4.3.5 and check our list of Known Issues before reporting

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Our next available supporter will start replying to tickets in about 8.90 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by stevenM-21 1 year, 1 month ago.

Assigned support staff: Bruno.

Author Posts
October 18, 2018 at 4:39 pm #2828849

stevenM-21

Hello,

When we we type in our business name in Google we get an indexed url that is pointing to an index of demo posts instead of our index page. This is only occuring since we started using WPML.

The indexed URL is hidden link and should be hidden link

Thanks
Steven

October 19, 2018 at 10:11 pm #2833136

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thank you for contacting us. Please, my sincere apologies for the delay in answering.

This looks like because initially, your site was using the URL format as a parameter, Google has indexed this page and has not yet updated.

You should use some plugin or some custom code to redirect the page when using the lang parameter. For example, in the file functions.php of your theme, after line 2, you can use this function:

add_action( 'template_redirect', function() {
	$lang = isset( $_GET['lang'] ) ? sanitize_key( $_GET['lang'] ) : false;
	
	if( ! empty( $lang ) ) {
		wp_redirect( get_site_url() . "/" . $lang . "/", 301 );
	}
});

Basically, this code will check if there is any lang parameter in the URL. If so, this will definitely redirect (code 301) to the URL format as "/nl/".

Note that it is necessary for Google to re-index your site and then update Google's internal records. For this, it is only necessary to wait.

Please, let me know if I can help with any other questions you may have. I'll be happy to help.

Thank you.

October 23, 2018 at 11:52 am #2842181

stevenM-21

Dear Bruno,

Thanks for your help. We have added the code on top of functions.php but as you will see by surfing to hidden link it still displays our latest posts instead of our frontpage.

We are getting a lot of problems with our website since we started using the paid version of WPML. For example it keeps showing old versions of the following pages although we have disabled wprocket, cdn and cloudflare:

hidden link: shows old menu without demo button
hidden link: shows old menu without language switcher
hidden link: shows correct menu

Please help us out as this nog making us look good.

Best
Steven

October 23, 2018 at 6:52 pm #2843908

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for the feedback. I noticed you are using a cache plugin. Have you tried clearing the cache to see if the problem persists?

Also, have you added the above code inside the functions.php file of your theme/child-theme?

About the other issues you are reporting if the problem persists, may I kindly ask you please to open a new ticket for your new question? This will also help other users with similar problems find solutions when searching the forum.

Thank you.

October 31, 2018 at 8:42 pm #2867464

stevenM-21

My issue is resolved now. Thank you!