Я использую WordPress в сочетании с WP Events Organizer. На моем index.php я хочу отображать события и сообщения в одном цикле, но только категории «startseite» должны отображаться как для событий, так и для сообщений. На данный момент он работает так:Event Organizer date in loop
<?php global $wp_query;
$args = array(
'post_type' => array('post','event'),
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'category',
'terms' => 'startseite',
'field' => 'slug'
),
array(
'taxonomy' => 'event-category',
'terms' => 'startseite',
'field' => 'slug'),
));
query_posts($args); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
... далее цикл:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article class="d-1of3" id="post-<?php the_ID(); ?>" <?php post_class('cf'); ?> role="article">
<div class="entry-content">
<h2 class="h2 entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<p class="byline entry-meta vcard">
<?php printf(__('', 'bonestheme').' %1$s',
'<time class="updated entry-time" datetime="' . get_the_time('Y-m-d') . '" itemprop="datePublished">' . get_the_time(get_option('date_format')) . '</time>'
); ?>
</p>
<section class="cf">
<?php the_content(); ?>
<?php echo eo_get_the_start('jS M YY'); ?>
</section>
</div>
<?php the_post_thumbnail('large'); ?>
</article>
<?php endwhile; endif; ?>
Теперь я хотел бы, чтобы отобразить дату события. Я нашел следующую ссылку с примером: http://codex.wp-event-organiser.com/function-eo_get_events.html
Но я не могу понять, как изменить свой код, чтобы отобразить дату. И также было бы здорово заказать события к дате. Спасибо за вашу помощь!!
Привет, вам нужно указать дату события или показать список событий за определенную дату? – Mauro
Привет, я хотел бы показать все события определенной категории (что я мог бы выяснить). Теперь я хочу отображать дату на каждом событии, когда это произойдет. – Irene