Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client wants to display "This post is also available in" only on single blog posts and not on the entire website.
Solution:
We recommend adding custom CSS to hide the language switcher on pages other than single blog posts. Here are the steps to follow:
1. Navigate to Appearance > Customizer > Additional CSS area in your WordPress dashboard.
2. Add the following CSS code:

.page-id-317 .wpml-ls-statics-post_translations {<br />display: none !important;<br />}

3. Save the changes.
This CSS will hide the language switcher on the main blog page but will still display it on single post pages.

If this solution doesn't look relevant, please open a new support ticket.

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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Mihai Apetrei 1 year, 6 months ago.

Assisted by: Mihai Apetrei.

Author Posts
December 14, 2023 at 11:24 pm #15069075

luisC-31

I want to display "This post is also available in" only on the blog single posts rather that the whole website pages

December 15, 2023 at 11:38 am #15071597

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Can you share with me a URL of a single blog post where there's an existing translation so that I can see that show up?

We will try to use some simple CSS code so that we can hide that on the other pages.

I will be waiting for your response.

Mihai Apetrei

December 18, 2023 at 2:38 am #15080055

luisC-31

Hi,

this is the blog URL where I need to hide the Link to translation hidden link

and this is an entry with an existing translation hidden link

Regards

December 19, 2023 at 7:54 pm #15096483

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there and thank you for the update.

You can go to Appearance > Customiser > Additional CSS area > add the following CSS code and save:


.page-id-317 .wpml-ls-statics-post_translations {
display: none !Important;
}

That will hide this block on the main blog page but it will still show it in the single post pages.

I hope that you will find this helpful. 🙂

Mihai