This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is experiencing issues viewing some pages in both the default language and other languages after updating WPML. They have identified that removing custom code from the functions.php file in their Flatsome child theme resolves the issue, but re-adding it brings the problem back.
Solution:
We recommend reviewing the custom code in the functions.php file to identify any potential conflicts or errors that could be causing the issue with WPML. Since the WPML support team does not provide support for custom code, we advise the client to consult with their developer or the person who added the custom code. This approach will help pinpoint and resolve the specific code causing the problem.
Please note that this solution might be outdated or not applicable to your specific case. If the issue persists, 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 you need further assistance, 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: Not WPML issue
This topic contains 3 replies, has 0 voices.
Last updated by Dražen 2 weeks, 3 days ago.
Assisted by: Dražen.
Author | Posts |
---|---|
September 24, 2025 at 11:44 am #17428965 | |
Omer-farukO |
Background of the issue: Symptoms: Questions: |
September 24, 2025 at 12:15 pm #17429138 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, here is a ticket, please check further and let me know once you have found the plugin that is causing the issue. I will advise further, and if something that we can help with. Let me know how it goes. Regards, |
September 24, 2025 at 10:50 pm #17430287 | |
Omer-farukO |
I've done a detailed review. All my plugins are active. I'm using the Flatsome child theme, and there's some code in my functions.php file. When I completely delete it, the problem goes away. However, when I add it, the problem persists. I'm sharing the file with you in the attachment. Can you tell me which code might be the problem? Any ideas? -------------------------------------------------------------------------------------------- /** Sepetetinizde ürün bulunmuyor uyarısını kaptmak için */ /** recaptcayı sadece iletişim sayfasına yüklemek için */ /*Plugin Name: Preserve Page and Taxonomy Hierarchy on Edit Menus Screen*/ function __construct() { function init() { function disable_paging_for_hierarchical_post_types( $query ) { if ( ! is_post_type_hierarchical( $query->get( 'post_type' ) ) ) { if ( 50 == $query->get( 'posts_per_page' ) ) { function remove_limit_for_hierarchical_taxonomies( $args, $taxonomies ) { if ( ! is_taxonomy_hierarchical( reset( $taxonomies ) ) ) { if ( 50 == $args['number'] ) { return $args; function remove_page_links_for_hierarchical_taxonomies( $selects, $args, $taxonomies ) { if ( ! is_taxonomy_hierarchical( reset( $taxonomies ) ) ) { if ( 'count' === $args['fields'] ) { return $selects; } new Preserve_Page_and_Taxonomy_Hierarchy; // SKU ARAMA İÇİN KOD - Function to modify the search query to include SKU in WooCommerce product searches - // Check if it's a search query and WooCommerce is active // Get the search query // Only modify the search if there is a search term return $search; // admin urunler sayfasında kategoriye göre filtreleme kısmını statik olarak gösterir //upsell kısmında sadece belirli bir niteliği göstermek için kullanılan kod remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); global $product; if ( ! $product ) { // Handle the legacy filter which controlled posts per page etc. wc_set_loop_prop( 'name', 'up-sells' ); $orderby = apply_filters( 'woocommerce_upsells_orderby', isset( $args['orderby'] ) ? $args['orderby'] : $orderby ); // set your custom taxonomy here. $term_slugs = wp_get_post_terms( $product->get_id(), $taxonomy, ['fields' => 'slugs'] ); $posts_ids = get_posts( array( if( !empty( $posts_ids ) ){ // Get visible upsells then sort them at random, then limit result set. wc_get_template( // Not used now, but used in the previous version of up-sells.php. } // megamenüde altkategorileri otomatik eklemek için kod // don't add child categories in administration of menus return $items; /** function add_dynamic_heading_above_image() { // Ürünün "pa_seri-adi" niteliğini alıyoruz. // Eğer bir nitelik bulunursa ve bir hata yoksa, devam ediyoruz. // Başlık metni olarak seri adını ve ek metni birleştiriyoruz. // HTML çıktısını ekrana basıyoruz. |
September 25, 2025 at 5:33 am #17430537 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, I am afraid I can not help or advise on custom code, it is out of scope of our support. I advise checking with your developer who added this code or similar. Regards, |