FEATURE Passing the metiers and elements organised by aprent to the column
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
70b0c7a89a
commit
a869d6fbb2
|
|
@ -86,7 +86,7 @@ function metiers_patrimoine_artisans_handle_posts_custom_columns($column)
|
|||
|
||||
|
||||
if ($column == 'metiers') {
|
||||
$terms = get_the_terms($post_id, 'metiers');
|
||||
$terms = get_the_terms_organised_by_parent('metiers', $post_id);
|
||||
if ($terms) {
|
||||
$parent_terms = array_filter($terms, function ($term) {
|
||||
return $term->parent == 0;
|
||||
|
|
@ -107,7 +107,7 @@ function metiers_patrimoine_artisans_handle_posts_custom_columns($column)
|
|||
}
|
||||
}
|
||||
if ($column == 'elements') {
|
||||
$terms = get_the_terms($post_id, 'elementsbatiments');
|
||||
$terms = get_the_terms_organised_by_parent('elementsbatiments', $post_id);
|
||||
if ($terms) {
|
||||
$parent_terms = array_filter($terms, function ($term) {
|
||||
return $term->parent == 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user