-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve txn date seminardesk template
(#7)
- Loading branch information
Showing
2 changed files
with
131 additions
and
2 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
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,127 @@ | ||
<?php | ||
/* | ||
* File originally from | ||
* https://bitbucket.org/seminardesk/seminardesk-wordpress/src/develop/templates/ | ||
* Original content Copyright 2020 SeminarDesk – Danker, Smaluhn & Tammen GbR . | ||
* Modifications Copyright 2020 Freundeskreis Ökodorf e.V. | ||
*/ | ||
?> | ||
|
||
<?php | ||
/** | ||
* The template for taxonomy sd_txn_dates by year or month | ||
* | ||
* @package SeminardeskPlugin | ||
*/ | ||
|
||
use Inc\Utils\TemplateUtils as Utils; | ||
|
||
get_header(); | ||
?> | ||
|
||
<section class="content"> | ||
|
||
<?php | ||
$txn = get_taxonomy(get_query_var( 'taxonomy' )); | ||
$title = ucfirst($txn->rewrite['slug']) . ': '. get_queried_object()->name; | ||
?> | ||
|
||
<?php /* Leaving vanilla hueman 3.2.9 single.php */ ?> | ||
<?php /*hu_get_template_part('parts/page-title');*/ ?> | ||
<div class="page-title pad group"> | ||
<h2><?php echo wp_kses_post( $title ); ?></h2> | ||
</div><!--/.page-title--> | ||
<?php /* Re-entering vanilla hueman */ ?> | ||
|
||
<!-- SeminarDesk original template --> | ||
|
||
<div class="pad group entry" id="site-content" role="main"> | ||
|
||
<header class="archive-header has-text-align-center header-footer-group"> | ||
|
||
<div class="archive-header-inner section-inner medium"> | ||
|
||
<!--<?php if ( $title ) { ?> | ||
<h1 class="archive-title"><?php echo wp_kses_post( $title ); ?></h1> | ||
<?php } ?>--> | ||
|
||
</div><!-- .archive-header-inner --> | ||
|
||
</header><!-- .archive-header --> | ||
|
||
<?php | ||
if ( have_posts() ) { | ||
while ( have_posts() ) { | ||
the_post(); | ||
$post_event = get_post( $post->wp_event_id ); | ||
?> | ||
<div class="sd-event"> | ||
<div class="entry-header-inner section-inner small"> | ||
<div class="sd-event-title"> | ||
<a href="<?php echo esc_url(get_permalink($post->wp_event_id)); ?>"> | ||
<?php | ||
Utils::get_value_by_language( $post_event->sd_data['title'], 'DE', '<h3>', '</h3>', true); | ||
?> | ||
</a> | ||
</div> | ||
<div class="sd-event-container"> | ||
<div class="sd-event-props"> | ||
<?php | ||
Utils::get_date( $post->sd_date_begin, $post->sd_date_end, '<div class="sd-event-date">' . __('<strong>Date: </strong>', 'seminardesk'), '</div>', true); | ||
Utils::get_facilitators($post_event->sd_data['facilitators'], '<div class="sd-event-facilitators"><strong>' . __('Facilitator: ', 'seminardesk') . '</strong>', '</div>', true); | ||
Utils::get_value_by_language($post->sd_data['priceInfo'], 'DE', '<div class="sd-event-price"><strong>' . __('Price: ', 'seminardesk') . '</strong>', '</div>', true ); | ||
Utils::get_venue($post->sd_data['venue'], '<div class="sd-event-venue"><strong>' . __('Venue: ', 'seminardesk') . '</strong>', '</div>', true); | ||
?> | ||
</div> | ||
<div class=sd-event-image> | ||
<?php | ||
Utils::get_img_remote( Utils::get_value_by_language($post_event->sd_data['teaserPictureUrl']), '300', '', $alt = __('remote image failed', 'seminardesk'), '', '', true); | ||
?> | ||
</div> | ||
<div class=sd-event-teaser> | ||
<?php | ||
echo Utils::get_value_by_language($post_event->sd_data['teaser']) | ||
?> | ||
<div class="sd-event-more-link"> | ||
<a class="button" href="<?php echo esc_url(get_permalink($post->wp_event_id)); ?>"> | ||
<?php esc_html_e('More', 'seminardesk')?> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
<?php | ||
}?> | ||
<div class="has-text-align-center"> | ||
<br><p><?php echo get_posts_nav_link();?></p> | ||
</div> | ||
<?php | ||
} else { | ||
?> | ||
<div class="entry-header-inner section-inner small has-text-align-center"> | ||
<h5> | ||
<?php | ||
_e('Sorry, no events for this date.', 'seminardesk'); | ||
?> | ||
</h5> | ||
<br> | ||
</div> | ||
<?php | ||
|
||
} | ||
?> | ||
|
||
</div><!-- #site-content --> | ||
|
||
<!-- End of SeminarDesk original template --> | ||
|
||
</section> | ||
|
||
<?php | ||
|
||
get_sidebar(); | ||
|
||
get_footer(); | ||
?> |