event condition in the loop
-
Hello, I would like to set a condition for the single event pages.
<div class="date"><i>Published the day <?php echo get_the_date('', $post->ID); ?> <?php if ( is_event() ) { echo '<h2>Welcome</h2>'; } ?> </i></div>Only if is an event page, it should show “Welcome”, if is not an event page it should show the publish date.
However the code
<?php if ( is_event() ) {does not work. Where I can find the correct code in order to replace it?
Thank you!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘event condition in the loop’ is closed to new replies.