How to loop over page type & custom attributes from Composer?
Permalink
Firs of all, I feel like an idiot. That being said:
I simply want to output entries from a specific page type in composer and loop over them on a page, displaying all the entries in block form. I do not know the best way to do this nor have found a solution online.
I would like the loop to output custom attributes that I have defined for the page type, and that I make available in the composer.
I am coming from WordPress, and am just having trouble figuring out how to loop over really anything and can't find documentation on it. Any help is appreciated. Thanks.
Something like this (obviously it will look nothing like this, but this is the kind of loop I woud like to do):
I simply want to output entries from a specific page type in composer and loop over them on a page, displaying all the entries in block form. I do not know the best way to do this nor have found a solution online.
I would like the loop to output custom attributes that I have defined for the page type, and that I make available in the composer.
I am coming from WordPress, and am just having trouble figuring out how to loop over really anything and can't find documentation on it. Any help is appreciated. Thanks.
Something like this (obviously it will look nothing like this, but this is the kind of loop I woud like to do):
$f_args = array( 'post_type' => 'faqs', 'posts_per_page' => 100, 'post_status' => 'publish', 'COMPOSER PAGE TYPE' => 'COMPOSER PAGE TYPE HANDLE', ); $f_loop = new WP_Query( $f_args ); if( $f_loop->have_posts() ) { while( $f_loop->have_posts() ) : $f_loop->the_post(); //output content endwhile;