Skip to content

Instantly share code, notes, and snippets.

@rallemann
Last active June 22, 2016 10:21
Show Gist options
  • Save rallemann/98cc9c43fffda75afa68d4bc52ebe3db to your computer and use it in GitHub Desktop.
Save rallemann/98cc9c43fffda75afa68d4bc52ebe3db to your computer and use it in GitHub Desktop.
<?php
return array(
"post_type" => array(
"cpt1",
"cpt2"
),
'posts_per_page' => 28,
'orderby' => 'rand',
);
?>
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( 'cpt1' == $post->post_type ) { }; ?>
Hello World
<?php endif; ?>
<?php if ( 'cpt2' == $post->post_type ) { }; ?>
Goodbye World
<?php endif; ?>
<?php endwhile; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment