Skip Navigation

[Resolved] Get post title of translated post

This support ticket is created 7 years, 4 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by dianaM-4 7 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#460286

Hi there!

I want to display the title of a post in my main-language "de" on all other language-sites. So the title in this specific view shouldn't be translated. (In another view, I need the translated title, so I can't name the post the same in all languages).

Is there a shortcode for this?
Something like [wpv-post-title lang="de"]?

Thanks!

#460309

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Diana,

Thank you for contacting our support forum.

Unfortunately no this wouldn't be possible 🙁

In order to achieve something like this you will need to create some custom shortcode to do this.

That is because the translation for the post is actually a separate post, so you will need some way to get the title of another post. Granted you can pass the post ID of the original post into the shortcode and it will display it that way.

But for an automatic method you will need to write some custom code.

Thanks,
Shane

#460608

Thanks, Shane,
not the answer I was hoping for. But thanks anyway 😉

Is there a way to use the Toolset-Shortcodes in the Javascript-area of views? So that I could use something like #[wpv-post-title] in jQuery?

I guess not. And I know, I'm in the wrong forum here, but perhaps you are familiar whit WPML: Do you know which field is describing the relation to the main-post? Is there something like the "_wpcf_belongs_{parent-slug}_id"-field?

Best regards, Diana

#461239

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Diana,

No that wouldn't be possible since shortcodes are interpreted using PHP and in the js area it will be loaded as a JS so it wouldn't get processed.

Also i believe its an icl_translation hidden field but i'm not 100% sure about this. The WPML forum will have more information on this part.

Thanks,
Shane

#462031

Thanks Shane, for your info. I mark this thread as resolved, because there is no Toolset solution.

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