extensions/blocks/homepage-articles/class-newspack-blocks-api.php 1 location
|
@@ 270-275 (lines=6) @@
|
| 267 |
|
} |
| 268 |
|
} |
| 269 |
|
|
| 270 |
|
if ( ! $category ) { |
| 271 |
|
$categories_list = get_the_category( $object['id'] ); |
| 272 |
|
if ( ! empty( $categories_list ) ) { |
| 273 |
|
$category = $categories_list[0]; |
| 274 |
|
} |
| 275 |
|
} |
| 276 |
|
|
| 277 |
|
if ( ! $category ) { |
| 278 |
|
return ''; |
extensions/blocks/homepage-articles/templates/article.php 1 location
|
@@ 45-50 (lines=6) @@
|
| 42 |
|
$category = get_term( $category_id ); |
| 43 |
|
} |
| 44 |
|
} |
| 45 |
|
if ( ! $category ) { |
| 46 |
|
$categories_list = get_the_category(); |
| 47 |
|
if ( ! empty( $categories_list ) ) { |
| 48 |
|
$category = $categories_list[0]; |
| 49 |
|
} |
| 50 |
|
} |
| 51 |
|
?> |
| 52 |
|
|
| 53 |
|
<article data-post-id="<?php the_id(); ?>" |