Skip Navigation

[Resolved] Alignment Issues for Multi-Language Content Template

This support ticket is created 5 years, 9 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)

Tagged: 

This topic contains 9 replies, has 4 voices.

Last updated by Christian Cox 5 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1207057
2.jpg
1.jpg

I am trying to:

Create a content template for all posts of a multi-language site. The main language of the site is Hebrew. I am using Beaver Builder to build the content templates.

Link to a page where the issue can be seen:

hidden link

User name: lawoffice
Password: lawoffice

I expected to see:

I expected to see the author name and author photo aligned next to each other.

Instead, I got:

The author name and author photo are not aligned next to each other.

See attached screenshots.

#1207266

Hi, I don't think Beaver Builder will change the column order automatically like this based on RTL / LTR language. Ordering columns LTR in a page builder like this requires either:
1. A different Content Template per language
2. A CSS-based approach where the author image and text are not in separate column modules in the BB template.

We have an API filter that will allow you to programmatically apply different Content Templates to specific posts:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_force_template
Here's an example where an LTR template is assigned to Posts:

add_filter( 'wpv_filter_force_template', 'toolset_ltr_template_override', 99, 3 );
function toolset_ltr_template_override( $template_selected, $id, $kind ) {
    // define the post types you want to override with this LTR template
    $post_types = array( 'post' );
    if ( in_array( get_post_type($id), $post_types) && !apply_filters( 'wpml_is_rtl', NULL) ) {
      $template_selected = 123; // assign an LTR Content Template with ID 123
    }
    return $template_selected;
}
#1216847

Hi, please don't close this thread. I had to attend to other things, but I will get back to this, thanks.

#1217140

I will stand by for your update. Thanks for letting me know.

#1220499

Shane
Supporter

Languages: English (English )

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

Hi Adam,

Christian is out today but should return tomorrow to continue assisting.

Thanks,
Shane

#1221523

Additionally, to what Christian already explained, you can also use WPML and actually translate your Content Templates.
This is possible once you set them to be translatable in Toolset > Settings

That could allow you to use different CT's (Content Templates) per language

Please let us know if this works for you.

#1224367

Hi, please don't close this thread. I had to attend to other things, but I will get back to this, thanks.

#1224641

Sure, thanks.

#1232603

Hi, please don't close this thread.

#1233540

Thanks for the update.