Desculpe, não encontramos nada aqui.
Museu da Pessoa
if (is_home() && $paged < 2 || is_category() && $paged < 2) {
$query = new WP_Query(array('category_name' => 'banner-rodape', 'orderby' => 'rand', 'order' => 'ASC', 'suppress_filters' => true, 'eventDisplay' => 'upcoming', 'posts_per_page' => -1));
} else {
$query = new WP_Query(array('category_name' => 'banner-rodape', 'orderby' => 'rand', 'order' => 'ASC', 'suppress_filters' => true, 'eventDisplay' => 'upcoming', 'posts_per_page' => 1));
}
$banners = [];
class BannerRodape {
public $link;
public $image;
public $title;
}
while ($query->have_posts()) {
$query->the_post();
$banner = new BannerRodape();
$banner->link = get_field('banner_link');
$banner->title = get_the_title();
$banner->image = get_field('banner_imagem');
$banners[] = $banner;
}
shuffle($banners);
// var_dump($banners);
foreach ($banners as $banner) {
?>
} ?>
if (is_home() && $paged < 2 || is_category() && $paged < 2) { ?>
} ?>