替代迴圈語法

你還可以使用帶有大括號的迴圈,如下所示:

if ( have_posts() ) {
    while ( have_posts() ) {

        the_post(); 
        var_dump( $post );
    
    }
}