Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $schedule= new WP_Query( array( 'post_type' => 'schedule' ) );
- if( $schedule->have_posts() ) {
- while ($schedule->have_posts()) {
- $schedule->the_post();
- the_title( '<h1>', '</h1>' );
- $temp_post = $post;
- $workshops = new WP_Query( array('post_type' => 'workshop') );
- if( $workshop->have_posts() ) {
- echo '<ul>';
- while($workshops->have_posts()) {
- $workshops->the_post();
- the_title( '<li>', '</li>' );
- }
- echo '</ul>';
- }
- $post = $temp_post;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement