Created
February 15, 2013 19:16
-
-
Save everdaniel/4962667 to your computer and use it in GitHub Desktop.
Get Custom Posts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'numberposts' => 18, | |
'orderby' => 'post_date', | |
'post_type' => 'cartelera' | |
); | |
$posts = get_posts( $args ); | |
if ( count( $posts ) > 0 ) : | |
?> | |
<div class="cinema"> | |
<header> | |
<i>Cartelera de Cine</i> | |
</header> | |
<div class="dynamicMovie"> | |
<div id="dlCartelera"> | |
<?php foreach( $posts as $post ) : ?> | |
<div class="cinema_row"> | |
<div class="poster"> | |
<?php if ( has_post_thumbnail() ) : ?> | |
<?php the_post_thumbnail( 'movie-poster' ) ?> | |
<?php else : ?> | |
<img src="<?php echo get_template_directory_uri(); ?>/images/movie_poster.jpg" alt="Movie Poster" /> | |
<?php endif ?> | |
</div> | |
<div class="description"> | |
<div class="title"><?php the_title() ?></div> | |
<div class="schedule"><?php the_excerpt() ?></div> | |
</div> | |
</div> | |
<?php endforeach ?> | |
</div> | |
<div class="dlNavMovie"> </div> | |
<div class="dlArrowNavMovie"> | |
<a href="#" class="prev"><<i></i></a> | |
<a href="#" class="next">><i></i></a> | |
</div> | |
</div> | |
<div class="bottom"> | |
<span class="title">Cine Granados</span> | |
</div> | |
</div> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment