Skip Navigation

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

Problem:
Rental items aren't showing for translations.
Solution:https://wpml.org/errata/traveler-theme-rental-listings-arent-displayed-on-secondary-languages/
If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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.

This topic contains 9 replies, has 2 voices.

Last updated by Shekhar Bhandari 1 month, 4 weeks ago.

Assisted by: Shekhar Bhandari.

Author Posts
April 18, 2024 at 5:44 am

veronikaM-7

Rental items aren't showing for translations

April 18, 2024 at 8:18 am
April 18, 2024 at 8:31 am #15536098

veronikaM-7

I still need assistance

April 18, 2024 at 11:07 am #15537814

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Are you able to replicate the issue on the sandbox site?

Look forward to your reply.

Thanks

April 25, 2024 at 5:30 am #15563205

veronikaM-7

No, I cannot replicate the issue on this site because it would take too much time

April 25, 2024 at 5:41 am #15563256

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for the feedback.

I would like to replicate your site on my localhost and perform further testings, would you mind sending me backup of the site, you can backup wp-content and database and send it to me using google drive.

I have enabled the private reply for you.

Thanks

April 30, 2024 at 12:44 pm
May 3, 2024 at 4:20 am #15589494

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I have escalated the issue to our compatibility team, I will update you as soon as I will receive any further feedback from them.

Thanks

May 10, 2024 at 8:37 am #15613517

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Our 2nd tier checked the issue and suggested the following workarround:

- Go to WPML->Settings->Custom XML configuration and add the following XML
https://pastebin.com/mBTimAep

- Go to wp-content/themes/traveler/inc/layouts/modern/class/class.rental.php file and replace the following

if (st_check_service_available('st_rental')) {
            $rental = STRental::inst();
            $rental->alter_search_query();
            $query = new WP_Query($args);
            if ($query->have_posts()) {
                echo '<div class="search-result-page st-rental service-slider-wrapper"><div class="st-hotel-result"><div class="owl-carousel st-service-rental-slider">';
                while ($query->have_posts()) :
                    $query->the_post();
                    echo st()->load_template('layouts/modern/rental/elements/loop/grid', '', array('slider' => true));
                endwhile;
                echo '</div></div></div>';
            }
            $rental->remove_alter_search_query();
            wp_reset_postdata();
            $post = $old_post;
        }

with

        if (st_check_service_available('st_rental')) {
            $rental = STRental::inst();
            // $rental->alter_search_query();
            $query = new WP_Query($args);
            if ($query->have_posts()) {
                echo '<div class="search-result-page st-rental service-slider-wrapper"><div class="st-hotel-result"><div class="owl-carousel st-service-rental-slider">';
                while ($query->have_posts()) :
                    $query->the_post();
                    echo st()->load_template('layouts/modern/rental/elements/loop/grid', '', array('slider' => true));
                endwhile;
                echo '</div></div></div>';
            }
            // $rental->remove_alter_search_query();
            wp_reset_postdata();
            $post = $old_post;
        }

Let me know if this helps.

Thanks

May 10, 2024 at 10:47 am #15614184

veronikaM-7

I get this error when I try to add custom CSS in WPML

wpml_error.JPG
May 13, 2024 at 5:00 am #15618497

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Do you mean custom XML?

I see the xml code is being trimmed off so can you try to use the workarround without the XML part.

Also if it still doesn't work, please provide me login details so I can add it directly.

I have enabled the private reply for you.

Look forward to your reply.

Thanks

May 17, 2024 at 10:52 am
May 20, 2024 at 4:44 am #15643529

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I fixed the issue on the test site, Previously I provided a incorrect path, so here is the updated path where you should make the change:

/wp-content/themes/traveler/st_templates/layouts/modern/elements/list_of_service.php

Also, since you are using the child theme you should also make the modifications there to fix the issue.
/wp-content/themes/traveler-childtheme/st_templates/layouts/modern/elements/list_of_service.php

Further, you need to clear the cache of your site to see it working, hidden link You can add numbers at the end to elimate the cache.

Let me know if this helps.

Thanks

May 20, 2024 at 6:03 am #15643725

veronikaM-7

Thank You very much. Yes, my issue is resolved now.

veronikaM-7 confirmed that the issue was resolved on 2024-05-20 06:03:41.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.