FEATURE changing default taxonomy when not passed to the component
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e2f328a3ed
commit
cd5d99a45c
|
|
@ -19,12 +19,13 @@ function build_search_artisan_posts_cards($request)
|
|||
$currentLanguage = esc_html($request->get_param('current-page-language')) ?? 'fr';
|
||||
$previousActivePage = esc_html($request->get_param('active-page')) ?? 1;
|
||||
$postsPerPage = esc_html($request->get_param('posts-per-page')) ?? 12;
|
||||
$taxonomy = esc_html($request->get_param('taxonomy')) ?? 'metiers';
|
||||
$taxonomy = esc_html($request->get_param('taxonomy'));
|
||||
$taxonomy = empty($taxonomy) ? null : $taxonomy;
|
||||
|
||||
$localisation = esc_html($request->get_param('localisation')) ?? null;
|
||||
$StringifiedTaxonomyIds = esc_html($request->get_param('taxonomy-ids')) ?? null;
|
||||
|
||||
do_action('wpml_switch_language', $currentLanguage);
|
||||
// $lang = apply_filters('wpml_current_language', null);
|
||||
$taxonomyIds = explode(',', $StringifiedTaxonomyIds);
|
||||
$taxonomyIds = array_map('intval', $taxonomyIds);
|
||||
$search_value = sanitize_text_field($request->get_param('search')) ?? null;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
<?php
|
||||
$postID = $args['post_ID'];
|
||||
// global $post;
|
||||
// $post = get_post($postID);
|
||||
// $post_name = $post->post_name;
|
||||
$post_name = get_post_field('post_name', $postID);
|
||||
|
||||
$current_lang = apply_filters('wpml_current_language', null);
|
||||
|
|
@ -16,7 +13,7 @@ $artisans_clean_url = get_site_url() . '/' . $lang_extension . 'artisans/' . $po
|
|||
|
||||
|
||||
$company_members = get_field('company_members', $postID);
|
||||
$currentTaxonomy = $args['current_taxonomy'];
|
||||
$currentTaxonomy = $args['current_taxonomy'] ?? 'elementsbatiments';
|
||||
|
||||
$taxonomySortedTerms = $currentTaxonomy === "elementsbatiments" ? get_the_terms_organised_by_parent('elementsbatiments', $postID) : get_the_terms_organised_by_parent('metiers', $postID);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user