Skip Navigation

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

Problem:
Hi, I am using WPML and also the WPML Sticky Links Plugin. In the blog posts, pages, etc. everything works fine. When I set an internal link like myblog.com/blog-post, it's converted to something like a dynamic link that looks like myblog.com/?p=16214 in the backend. Correctly, the front end shows the real link. So far, so good...

However, when I use the page builder or some elements from my theme (Uncode), for every internal link that I create within that element (for example blocks, footer, and others), the dynamic links don't change on the front end. Thus, I see links like myblog.com/?p=16214 on my blog that don't look good and are probably not good for SEO. You can see that problem in my footer here: https://homeiswhereyourbagis.com/

How can this be fixed? I believe this must be some issue with WPML Sticky Links, because when I deactivate this plugin, the internal links are fine in my footer or other theme-specific

Solution:
I was able to solve this problem with the code that you provided on this page:

https://wpml.org/documentation/getting-started-guide/sticky-links/

With the code

if ( class_exists( 'WPML_Sticky_Links' ) ) {
global $WPML_Sticky_Links;
add_filter( 'do_shortcode_tag', [ $WPML_Sticky_Links, 'show_permalinks' ], 0 );
}

it was solved.

Relevant Documentation:
https://wpml.org/documentation/getting-started-guide/sticky-links/

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 5 replies, has 2 voices.

Last updated by Lauren 10 months, 1 week ago.

Assisted by: Lauren.

Author Posts
August 13, 2024 at 7:06 pm #16067784

marcelG-8

Background of the issue:
Hi, I am using WPML and also the WPML Sticky Links Plugin. In the blog posts, pages, etc. everything works fine. When I set an internal link like myblog.com/blog-post, it's converted to something like a dynamic link that looks like myblog.com/?p=16214 in the backend. Correctly, the front end shows the real link. So far, so good...

However, when I use the page builder or some elements from my theme (Uncode), for every internal link that I create within that element (for example blocks, footer, and others), the dynamic links don't change on the front end. Thus, I see links like myblog.com/?p=16214 on my blog that don't look good and are probably not good for SEO. You can see that problem in my footer here: hidden link

How can this be fixed? I believe this must be some issue with WPML Sticky Links, because when I deactivate this plugin, the internal links are fine in my footer or other theme-specific elements.

Symptoms:

Questions:

August 14, 2024 at 9:53 pm #16072556

Lauren
WPML Supporter since 10/2015

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Were you able to review the Sticky LInks documentation, and if so, did it resolve the issues you were having?

August 19, 2024 at 2:29 pm #16084326

marcelG-8

Hi, I was able to solve this problem with the code that you provided on this page:

https://wpml.org/documentation/getting-started-guide/sticky-links/

With the code

if ( class_exists( 'WPML_Sticky_Links' ) ) {
global $WPML_Sticky_Links;
add_filter( 'do_shortcode_tag', [ $WPML_Sticky_Links, 'show_permalinks' ], 0 );
}

it was solved.

However, this only applies to my German version of the website. My English site still shows these /?p=1234 Links. How can this be solved?

August 20, 2024 at 2:51 pm #16087552

Lauren
WPML Supporter since 10/2015

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Have you tried updating both the original post and the translation where this links are inserted since you added this code?

In addition, do you have the checkbox ticked to "make themes multilingual" in WPML -> Languages? If so, if you disable/enable this, do you find any difference in link behavior?

if not, please provide a specific page that we can look at to double check the links. Thanks.

August 21, 2024 at 2:47 pm #16091044

marcelG-8

I've noticed that in the English version of my links, there was something like /en/?p=12345

I don't know why the /en/ was in the link, but after removing it, everything works fine now. 🙂

Thank you

August 21, 2024 at 3:49 pm #16091424

Lauren
WPML Supporter since 10/2015

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Glad to hear everything is working as expected. If you run into any further issues please don't hesitate to contact WPML support. Have a great day.