From 56dae76c2ea2665b7689d7ce7324f02940f8a6bf Mon Sep 17 00:00:00 2001 From: Nonimart Date: Fri, 11 Jul 2025 11:21:25 +0200 Subject: [PATCH] FIX breacrumb language items --- single-artisans.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/single-artisans.php b/single-artisans.php index a3f68ed..4734aee 100644 --- a/single-artisans.php +++ b/single-artisans.php @@ -21,9 +21,12 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null; $frontPageTitle = get_the_title(get_option('page_on_front')); $searchPageId = 43; + $currentLang = apply_filters('wpml_current_language', null); + $searchPageId = apply_filters('wpml_object_id', $searchPageId, 'page', TRUE, $currentLang); + $searchPageTitle = get_the_title($searchPageId); $searchPageUrl = get_post_permalink($searchPageId); - $currentLang = apply_filters('wpml_current_language', null); + do_action('wpml_switch_language', 'fr'); $pageIcon = get_field('page_icon', $searchPageId) ?? null; do_action('wpml_switch_language', $currentLang);