Skip Navigation

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

Problem:
The client is unable to display the WooCommerce Category Header Image on translated pages using the Salient Theme. The image does not automatically copy to translated languages, and cannot be added manually.

Solution:
We applied an updated code to ensure that the Category Header Image is displayed on all translated pages. Here is the code snippet that addresses the issue:

// Woocommerce archives.
            if( is_product_category() || is_product_tag() || is_product_taxonomy() ) {
 
                $subtitle           = '';
                $title                  = woocommerce_page_title(false);
                $cate                   = get_queried_object();
                $t_id                   = (property_exists($cate, 'term_id')) ? $cate->term_id : '';
                // WPML Workaround for compsupp-7882
                if ( class_exists('Sitepress') ) { 
                    $default_lang = apply_filters('wpml_default_language', NULL ); 
                    $t_id  = apply_filters( 'wpml_object_id', $t_id, $cate->taxonomy, TRUE, $default_lang );
                }
                $product_terms  = get_option( "taxonomy_$t_id" );
                $bg  

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly 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.

Tagged: 

This topic contains 0 reply, has 0 voices.

Last updated by Kor 4 months ago.

Assisted by: Kor.

Author Posts
March 7, 2025 at 5:17 am #16786029

anttiH-4

Hi,

It seems to be ok. Thank you for support!

March 7, 2025 at 5:29 am #16786038

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your feedback. Please mark this ticket as resolved.