-1,
‘post_type’ => ‘slider_principal’,
‘orderby’ => ‘title’,
‘order’ => ‘ASC’,
);
$registros = new WP_Query( $args );
if( $registros->have_posts() ):
while( $registros->have_posts() ) : $registros->the_post();
$slider_principal = get_field(‘slider’);
$slider_link = get_field(‘link_do_slider’);
$slider_target = get_field(‘destino_do_link’);
if (isset($slider_link) && !empty($slider_link)) {
echo ‘
‘;
} else {
echo ‘
‘;
}
endwhile;
wp_reset_postdata();
endif;
?>