80d5cd03 by Jeff Balicki

ddd

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent fa441e11
......@@ -28,7 +28,7 @@ if( !empty($block['align']) ) {
if( $is_preview ) {
$className .= ' is-admin';
}
$categoryID = get_field( "categories" );
$category_slug = get_field( "category" );
$title = get_field( "title" );
?>
......@@ -40,13 +40,13 @@ $title = get_field( "title" );
'tax_query' => array(
array(
'taxonomy' => 'categories',
'terms' => $categoryID, // term id
'field' => 'term_id',
'terms' => $category_slug, // term id
'field' => 'slug',
)
)
);
if($categoryID == ""){
if($category_slug == ""){
$args = array(
'post_type' => 'attachment',
'posts_per_page' => -1,
......@@ -61,12 +61,12 @@ $args = array(
'tax_query' => array(
array(
'taxonomy' => 'categories',
'terms' => $categoryID, // term id
'field' => 'term_id',
'terms' => $category_slug, // term id
'field' => 'slug',
)
)
);
if($categoryID == ""){
if($category_slug == ""){
$args = array(
'post_type' => 'documents',
'posts_per_page' => -1,
......