Skip Navigation

[Resolved] Translated post name does not appear in archive

This support ticket is created 2 years, 10 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by blueS-2 2 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#2101591

Hello
I need help with 4 things in views/archives/content templates using blocks.

The site is being developed but publicly accessible, uses the latest versions of toolset, wordpress, woocommerce, relevanssi and kadence theme and blocks. It's a corporate site, with a services catalog (ask for price/information), static pages (about us, governance, why us,...), news (2500 blog posts) and an area for more insightful posts (a cpt made with types), plus some extra cpt's for specific information (old projects, press releases, customers). Site is in portuguese (pt-pt).

2) Localized Post name in search archive: created an archive for search results, using relevanssi for indexing, the search archive shows all cpt's of the website, however the translated post type names do not show up. Site is in portuguese (pt-pt), but woocommerce products keep showing up as "product" and not "produto" and posts as "post" not "artigo". Used a conditional for the posts to show up as "noticia", but am afraid of having more nested conditional having a toll in performance. Tried loco translate, but it does not find the .po/.mo for toolset/blocks/woo blocks, tried "say what" plugin with toolset and woo text domains, but no substitutions are made. Is there a way of blocks/views use the localized version of wordpress/woocommerce?
You can see an example here hidden link

Thanks in advance and best regards
Alex

#2101939

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Alex,

Thank you for contacting us and I'd be happy to assist.

To understand the current setup on your website and suggest the best way to translate these post types labels, I'll need access to the website's admin area.

Can you please share temporary admin login details in reply to this message?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#2103613

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing these details and I apologize for the delay in getting back on this.

During testing, I was able to show the translated post type names without using any conditions, through the "wpv-post-type" shortcode:
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-type )


[wpv-post-type show="single"]

Screenshot: hidden link

I hope this helps.

#2106587

Hello Waqar
Thank you very much for your assistance. I was able to get it working.
My issue is resolved now. Thank you!

Just one final thought: I used conditionals for the issue 2) and only activating debugging allowed me to see what was happening: the product type is returned OK for standard posts, but when the conditional is on a woo product, the standard wpv-post-type returns the product permalink path rather than the post type. Only when using the "single" operator the conditional returns the correct value. Also, the conditional formula keeps losing the "single" operator when edited. Just a hint, in case someone else has the same problem.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.