Boa tarde a todos
Onde tem a opção no código abaixo 'posts_per_page' => 1
function pegandoTextosParaBanner()
{
    $args = array(
        'post_type' => 'banners',
        'post_status' => 'publish',
        'posts_per_page' => 1
    );
    $query = new WP_Query($args);
    if ($query->have_posts()):
        while ($query->have_posts()): $query->the_post();
            $texto1 = get_post_meta(get_the_ID(), '_texto_home_1', true);
            $texto2 = get_post_meta(get_the_ID(), '_texto_home_2', true);
            return array(
                'texto_1' => $texto1,
                'texto_2' => $texto2
            );
        endwhile;
    endif;
}Existe uma função pelo WordPress que fosse possível customizar para aparecer a cada reload da página um banner diferente?
Desde já grato Fabricio
 
            