Skip Navigation

[Resolved] Archive Pagination and WPML

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

Problem: I have a WordPress Archive that includes pagination. The links to each page appear correctly in my primary language, but in my translated language site I see the placeholder shortcodes instead of the correct page number:

%%SEITE%%

Solution: Select "Translate the theme and plugins using WPML's String Translation only (don't load .mo files)" in WPML > Theme and Plugin Localization.

Relevant Documentation: https://wpml.org/documentation/getting-started-guide/theme-localization/

This support ticket is created 7 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by peg 7 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#532881

peg
Image 003.jpg
Image 002.jpg
Image 001.jpg

Hi there,

I have a little issue with setting up pagination in a post archive view in combination with WPML.
It works all fine unless I switch the language (EN->DE). Please see attached screenshots on how I set it up and how the outcome looks like.

[wpv-pager-archive-nav-links output="bootstrap" previous_next_links="true" force_previous_next="true" step="9" reach="10" text_for_previous_link="«" text_for_next_link="»"]

Somehow the %%page%% link is automatically translated to German. I have searched the string translation for this string but it is not showing up so I cannot correct this in any way.

Do you have some advise for me?

Thanks,
Peg

#532912
Screen Shot 2017-06-05 at 11.23.04 AM.png

Hi, that's strange. Can you try these troubleshooting steps for me?
- Hard-code the page placeholder by adding anchor_text="%%PAGE%%" to your pagination shortcode, then test again
- Temporarily deactivate everything except Toolset and WPML plugins, and activate a default theme like Twenty Seventeen, then test again
- Make a full backup of your site, then go to WPML > Support and click "Troubleshooting". Try the Clean Up tasks shown in the screenshot I've attached here

If none of these resolves the issue, please provide a URL where I can see your site and test this out. Thanks!

#532924

peg

Hi Christian,
Thanks for your quick reply. It seems I got it solved.
It was a WPML setting in the Theme & Plugin localization. Once I set it to "Translate the theme and plugins using WPML's String Translation only (don't load .mo files)" it worked correctly.
Looks like the theme translation did an overwrite of some kind since I previously loaded the .po file.

I just wonder if the pagination shortcode could be protected from something like this to happen.
I'll keep this thread open for a bit. Just in case.

(Btw, I tried to hardcode the placeholder into the shortcode before but it had the same effect.)

Best,
Peg

#532928

Glad you got it working Peg. This ticket will remain open for 30 days pending follow-up communication.

#532936

peg

I'm gonna close it. Looks like it's working now.
Thanks again.