• Resolved jacksbird

    (@jacksbird)


    Hi there – I am working with the Event Organiser Plugin and having some issues.

    I am trying to modify two templates: single-event.php, and event-meta-single-event.php. I am trying to do 2 things:

    1) on the single event page, disable categories and tags from showing
    2) on the single event page, move the event details to show up below the event description/content

    I’m having 2 problems:

    1) If I copy the template files into my theme, and edit them, no changes show up on the site. However, if I make the edits directly to the template files within the plugins directory, the changes do show up
    2) I cannot figure out what I need to change on the single event page to move the details below the event’s content/description. Nothing I move makes it work.

    This is the code for the single event page:

    <?php
    /**
     * The template for displaying a single event
     *
     * Please note that since 1.7, this template is not used by default. You can edit the 'event details'
     * by using the event-meta-event-single.php template.
     *
     * Or you can edit the entire single event template by creating a single-event.php template
     * in your theme. You can use this template as a guide.
     *
     * For a list of available functions (outputting dates, venue details etc) see https://codex.wp-event-organiser.com/
     *
     ***************** NOTICE: *****************
     *  Do not make changes to this file. Any changes made to this file
     * will be overwritten if the plug-in is updated.
     *
     * To overwrite this template with your own, make a copy of it (with the same name)
     * in your theme directory. See https://docs.wp-event-organiser.com/theme-integration for more information
     *
     * WordPress will automatically prioritise the template in your theme directory.
     ***************** NOTICE: *****************
     *
     * @package Event Organiser (plug-in)
     * @since 1.0.0
     */
    
    //Call the template header
    get_header(); ?>
    
    <div id="primary">
    	<div id="content" role="main">
    
    		<?php while ( have_posts() ) : the_post(); ?>
    
    			<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    			<header class="entry-header">
    
    				<!-- Display event title -->
    				<h1 class="entry-title"><?php the_title(); ?></h1>
    
    			</header><!-- .entry-header -->
    	
    			<div class="entry-content">
    				
    				<!-- The content or the description of the event-->
    				<?php the_content(); ?>
    <!-- Get event information, see template: event-meta-event-single.php -->
    				<?php eo_get_template_part( 'event-meta', 'event-single' ); ?>
    
    			</div><!-- .entry-content -->
    
    			<footer class="entry-meta">
    			<?php
    			//Events have their own 'event-category' taxonomy. Get list of categories this event is in.
    			$categories_list = get_the_term_list( get_the_ID(), 'event-category', '', ', ','' );
    
    			if ( '' != $categories_list ) {
    				$utility_text = __( 'This event was posted in %1$s by <a href="%3$s">%2$s</a>.', 'eventorganiser' );
    			} else {
    				$utility_text = __( 'This event was posted by <a href="%3$s">%2$s</a>.', 'eventorganiser' );
    			}
    			printf($utility_text,
    				$categories_list,
    				get_the_author(),
    				esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
    			);
    			?>
    
    			<?php edit_post_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?>
    			</footer><!-- .entry-meta -->
    
    			</article><!-- #post-<?php the_ID(); ?> -->
    
    			<!-- If comments are enabled, show them -->
    			<div class="comments-template">
    				<?php comments_template(); ?>
    			</div>				
    
    		<?php endwhile; // end of the loop. ?>
    
    	</div><!-- #content -->
    </div><!-- #primary -->
    
    <!-- Call template footer -->
    <?php get_footer();
    
    

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Events Organiser plugin: modifying event templates’ is closed to new replies.