fabbaf
Forum Replies Created
-
I wanted to avoid another custom php-file, but right now I added a custom archive-event.php where I changed this:
<header class="post-header"> <?php if ( 'post' === get_post_type() ) : ?> <div class="post-meta"> <?php wp_posted_on(); ?><span> / </span><?php wp_posted_in(); ?> </div><!-- .post-meta --> <?php the_title( '<h2 class="post-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); ?> <?php endif; ?> </header><!-- .post-header -->to this
<header class="event-header"> <?php global $post; $EM_Event = em_get_event($post->ID, 'post_id'); echo $EM_Event->output('#_EVENTNAME'); ?> </header><!-- .post-header -->Now the event names/titles are showing up.
- This reply was modified 7 years, 8 months ago by fabbaf.
Thanks for your fast reply.
On my ‘normal’ archive page, everything is working fine (the_title is showing up), but it is not on the Events Archive Page. Unfortunately I don’t know where to make the adjustments to show the title of the event on my events archive page.
Here is the relevant part from my php-file.
<div <?php post_class('col-md-6 col-sm-12'); ?>> <div class="post-wrap row"> <div class="col-12"> <header class="post-header"> <?php if ( 'post' === get_post_type() ) : ?> <div class="post-meta"> <?php wp_posted_on(); ?><span> / </span><?php wp_posted_in(); ?> </div><!-- .post-meta --> <?php the_title( '<h2 class="post-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); ?> <?php endif; ?> </header><!-- .post-header --> </div><!-- .col-12 --> <div class="col-5 post-thumbnail"> <?php wp_post_thumbnail(''); ?> </div><!-- .post-thumbnail --> <div class="col-7 post-excerpt"> <?php the_excerpt(); ?> </div><!-- .post-excerpt --> </div><!-- .row --> </div><!-- #post-<?php the_ID(); ?> -->- This reply was modified 7 years, 8 months ago by fabbaf.
Awesome. That’s exactly what I need. Thank you.
Would be awesome to see an update of your plugin. Will it be possible to remove attributes which are not needed?