Last active
April 5, 2016 16:34
-
-
Save joshfeck/4a2b60e95decec5ccc115ad7c00ee47c to your computer and use it in GitHub Desktop.
Single Event Espresso event template for use with the Eventica child theme. Upload the single-espresso_events.php file to your Eventica chile theme. You'll also add a line of code to the child theme's functions.php file. From: https://eventespresso.com/topic/updating-the-look-and-feel/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add the following line of code to your Eventica child theme's functions.php file: | |
add_filter('FHEE__EED_Event_Single__template_include__allow_custom_selected_template', '__return_true' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* | |
* WARNING: This file is derived from the Eventica parent theme. | |
* Please do all modifications in the form of a child theme. | |
* | |
* @category Espresso Events | |
* @package Templates | |
* @author TokoPress | |
* @link http://www.tokopress.com | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
get_header(); ?> | |
<?php if( ! of_get_option( 'tokopress_page_title_disable' ) ) : ?> | |
<?php get_template_part( 'block-page-title' ); ?> | |
<?php endif; ?> | |
<div id="main-content"> | |
<div class="container"> | |
<?php if ( have_posts() ) : ?> | |
<div class="main-wrapper"> | |
<?php do_action( 'tokopress_before_content' ); ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<article id="page-<?php the_ID(); ?>" <?php post_class( 'page-single clearfix' ); ?>> | |
<div class="inner-page"> | |
<?php if( has_post_thumbnail() ) : ?> | |
<div class="post-thumbnail"> | |
<?php the_post_thumbnail(); ?> | |
</div> | |
<?php endif; ?> | |
<div class="post-content"> | |
<?php if( ! of_get_option( 'tokopress_page_title_disable' ) ) : ?> | |
<h2 class="post-title screen-reader-text"><?php the_title(); ?></h2> | |
<?php else : ?> | |
<h1 class="post-title"><?php the_title(); ?></h2> | |
<?php endif; ?> | |
<?php the_content(); ?> | |
<?php wp_link_pages( array( 'before' => '<p class="page-link"><span>' . __( 'Pages:', 'tokopress' ) . '</span>', 'after' => '</p>' ) ); ?> | |
</div> | |
</div> | |
</article> | |
<?php endwhile; ?> | |
<?php do_action( 'tokopress_after_content' ); ?> | |
</div> | |
<?php else : ?> | |
<?php get_template_part( 'content', 'none' ); ?> | |
<?php endif; ?> | |
</div> | |
</div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment