Skip to content

Commit

Permalink
Templates für FAU-Events
Browse files Browse the repository at this point in the history
  • Loading branch information
cassandre committed Dec 5, 2023
1 parent 220bdab commit aeeb98d
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/cpt/single-event.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<div class="content-container">
<div class="content-row">
<main>
<article class="rrze-event" itemscope itemtype="https://schema.org/Event">
<article class="rrze-event" itemscope itemtype="https://schema.org/Event">

<header class="entry-header">
<?php the_title('<h1 class="entry-title itemprop="name">', '</h1>'); ?>
<?php the_title('<h1 class="entry-title" itemprop="name">', '</h1>'); ?>
</header><!-- .entry-header -->

<div class="rrze-event-main">
Expand Down
42 changes: 42 additions & 0 deletions templates/cpt/themes/fau-events/archive-event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**
* The template for displaying archive pages
*/

use RRZE\Calendar\Shortcodes\Events;

if (isset($_GET['format']) && $_GET['format'] == 'embedded') {
get_template_part('template-parts/archive', 'embedded');
return;
}
get_header();
global $wp_query;

?>

<div class="content-wrap">
<div id="blog-wrap" class="blog-wrap cf">
<div id="primary" class="site-content cf" role="main">

<header class="archive-header">
<h1 class="archive-title" ><?php _e('Events', 'rrze-calendar'); ?></h1>
</header><!-- end .archive-header -->

<?php
$atts = [];
$queryVars = $wp_query->query_vars;
if (isset($queryVars['rrze-calendar-category']) && $queryVars['rrze-calendar-category'] != '') {
$atts['categories'] = sanitize_title($queryVars['rrze-calendar-category']);
$atts['abonnement_link'] = '1';
$atts['number'] = '99';
}
echo Events::shortcode($atts);
?>

</div><!-- end #primary -->
<?php get_sidebar(); ?>
</div><!-- end .blog-wrap -->
</div><!-- end .content-wrap -->

<?php
get_footer();
45 changes: 45 additions & 0 deletions templates/cpt/themes/fau-events/single-event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
/**
* The template for displaying a single post.
*/

use RRZE\Calendar\CPT\CalendarEvent;

wp_enqueue_style('rrze-calendar-sc-events');
wp_enqueue_style( 'dashicons' );

get_header();

$id = get_the_ID();
$data = CalendarEvent::getEventData($id);

while (have_posts()) : the_post(); ?>

<div id="singlepost-wrap" class="singlepost-wrap cf">
<article class="rrze-event" itemscope itemtype="https://schema.org/Event">

<header class="entry-header">
<?php the_title('<h1 class="entry-title" itemprop="name">', '</h1>'); ?>
</header><!-- .entry-header -->

<div class="rrze-event-main">

<?php if (has_post_thumbnail() && !post_password_required()) { ?>
<figure class="post-thumbnail wp-caption alignright">
<?php the_post_thumbnail('medium'); ?>
<figcaption class="wp-caption-text"><?php echo get_the_post_thumbnail_caption(); ?></figcaption>
</figure>
<?php } ?>

<?php CalendarEvent::displayEventMain($data); ?>

</div>

<?php CalendarEvent::displayEventDetails($data); ?>

</article>
</div>

<?php endwhile;

get_footer();

0 comments on commit aeeb98d

Please sign in to comment.