-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
afe9716
commit c0f5f70
Showing
6 changed files
with
158 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
/** | ||
* | ||
* @link https://developer.wordpress.org/themes/template-files-section/page-template-files/ | ||
* | ||
* @package coletivo | ||
*/ | ||
|
||
get_header(); ?> | ||
<div id="content" class="container"> | ||
<?php $current_date = date('Y-m-d');?> | ||
<?php $query = new WP_Query( | ||
array( | ||
'post_type' => 'el_events', | ||
'posts_per_page' => -1, | ||
'orderby' => 'meta_value', | ||
'meta_key' => 'startdate', | ||
'meta_compare' => '>=', | ||
'meta_value' => $current_date, | ||
'order' => 'ASC' | ||
) | ||
); | ||
?> | ||
<?php if ( $query->have_posts() ) : ?> | ||
<h1 class="the-title"> | ||
<?php _e( 'Agenda - Proximos eventos', 'csem-theme' );?> | ||
</h1><!-- .the-title --> | ||
<div class="col-md-12 agenda-container"> | ||
<?php while( $query->have_posts() ) : $query->the_post(); ?> | ||
<?php get_template_part( 'section-parts/each-agenda' ); ?> | ||
<?php endwhile;?> | ||
</div><!-- .col-md-12 agenda-container --> | ||
<?php endif;?> | ||
<?php $query = new WP_Query( | ||
array( | ||
'post_type' => 'el_events', | ||
'posts_per_page' => -1, | ||
'orderby' => 'meta_value', | ||
'meta_key' => 'startdate', | ||
'meta_compare' => '<', | ||
'meta_value' => $current_date, | ||
'order' => 'ASC' | ||
) | ||
); | ||
?> | ||
<?php if ( $query->have_posts() ) : ?> | ||
<h1 class="the-title"> | ||
<?php _e( 'Agenda - Eventos Anteriores', 'csem-theme' );?> | ||
</h1><!-- .the-title --> | ||
<div class="col-md-12 agenda-container"> | ||
<?php while( $query->have_posts() ) : $query->the_post(); ?> | ||
<?php get_template_part( 'section-parts/each-agenda' ); ?> | ||
<?php endwhile;?> | ||
</div><!-- .col-md-12 agenda-container --> | ||
<?php endif;?> | ||
|
||
</div><!-- #content --> | ||
|
||
<?php get_footer(); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div class="col-md-4 each-agenda"> | ||
<?php $thumb_url = get_the_post_thumbnail_url( get_the_ID(), 'large' );?> | ||
<div class="the-thumb" style="background-image:url('<?php echo esc_url( $thumb_url );?>"> | ||
<a href="<?php the_permalink();?>"> | ||
<h3 class="the-title"> | ||
<?php if ( ! is_singular( 'el_events' ) ) : ?> | ||
<?php the_title();?> | ||
<?php endif;?> | ||
</h3><!-- .the-title --> | ||
<?php if ( $meta = get_post_meta( get_the_ID(), 'startdate', true ) ) : ?> | ||
<?php $date = new DateTime( $meta );?> | ||
<h4 class="the-date"><?php echo $date->format( 'd/m');?></h4><!-- .the-date --> | ||
<?php endif;?> | ||
</a> | ||
</div><!-- .the-thumb --> | ||
<h4 class="the-time"> | ||
<?php if ( $meta = get_post_meta( get_the_ID(), 'starttime', true ) ) : ?> | ||
<?php printf( __( 'A partir das %shrs', 'csem-theme' ), $meta );?> | ||
<?php endif;?> | ||
</h4><!-- .the-time --> | ||
</div><!-- .col-md-4 each-agenda --> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* | ||
* @link https://developer.wordpress.org/themes/template-files-section/page-template-files/ | ||
* | ||
* @package coletivo | ||
*/ | ||
|
||
get_header(); ?> | ||
<?php while( have_posts() ) : the_post(); ?> | ||
<div id="content" class="container"> | ||
<h1 class="the-title"> | ||
<?php the_title();?> | ||
</h1><!-- .the-title --> | ||
<div class="col-md-12 agenda-container"> | ||
<?php get_template_part( 'section-parts/each-agenda' ); ?> | ||
</div><!-- .col-md-12 agenda-container --> | ||
</div><!-- #content --> | ||
</div><!-- #page --> | ||
<div class="hfeed site"> | ||
<div class="container" id="the-content"> | ||
<h3> | ||
<?php _e( 'SOBRE O EVENTO: ', 'csem-theme' );?> | ||
</h3> | ||
<?php the_content();?> | ||
</div><!-- #the-content.container --> | ||
<?php endwhile;?> | ||
<?php get_footer(); |
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