Skip to content

Commit

Permalink
KAD-2271 Fix post has taxonomy when using conditional in QL
Browse files Browse the repository at this point in the history
  • Loading branch information
oakesjosh committed Jun 25, 2024
1 parent 70458f4 commit fe32b1f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions includes/class-kadence-blocks-posts-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,16 @@ public function get_taxonomies_content( $request ) {
$type = get_post_type( $source );
if ( empty( $type ) ) {
return '';
} else if( $type === 'kadence_query' ) { // If it's a query block, return all post type for conditional display.
$post_types = kadence_blocks_get_post_types();
} else {
$post_types = array(
array(
'value' => $type,
'label' => $type,
),
);
}
$post_types = array(
array(
'value' => $type,
'label' => $type,
),
);
}
$taxs = array();
foreach ( $post_types as $key => $post_type ) {
Expand Down

0 comments on commit fe32b1f

Please sign in to comment.