Title: genesis integration
Last modified: August 21, 2016

---

# genesis integration

 *  Resolved [ellebillias](https://wordpress.org/support/users/ellebillias/)
 * (@ellebillias)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/genesis-integration-1/)
 * hi, i currently have a filter setup to do a custom page title div using genesis_before_content_sidebar_wrap–
   on my event archive and event single this doesn’t fire, I’m assuming your templates
   take over these actions? how can i customise so that the genesis functions are
   still working?
 * [http://wordpress.org/plugins/the-events-calendar/](http://wordpress.org/plugins/the-events-calendar/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Barry Hughes](https://wordpress.org/support/users/websitebakery/)
 * (@websitebakery)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/genesis-integration-1/#post-4446000)
 * We don’t have any code the specifically makes use of Genesis actions/filters 
   within the core plugin. Perhaps something else results in that action not being
   fired?
 * Since it’s sounding like a problem with custom code and which in turn builds 
   on a non-default theme (Genesis in particular isn’t really structured like other
   themes) it is a little difficult to help you out on this one, I’m afraid.
 *  Thread Starter [ellebillias](https://wordpress.org/support/users/ellebillias/)
 * (@ellebillias)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/genesis-integration-1/#post-4446009)
 * i worked it out myself – here is the code if anyone else is interested:
 * create a folder in your theme called “tribe-events” and paste this code in to
   a file called “default-template.php”
 *     ```
       <?php
       //* Default Events Template - Genesis
   
       remove_action( 'genesis_loop', 'genesis_do_loop' );
       add_action( 'genesis_loop', 'eco_tribe_events_template' );
   
       function eco_tribe_events_template() {
       	echo '<article id="tribe-events-pg-template" class="entry">';
       	tribe_events_before_html();
       	tribe_get_view();
       	tribe_events_after_html();
       	echo '</article> <!-- #tribe-events-pg-template -->';
       }
   
       add_filter( 'genesis_build_crumbs', 'tribe_events_genesis_crumb_filter', 10, 2 );
       add_filter( 'genesis_single_crumb', 'tribe_events_genesis_crumb_single', 10, 2 );
   
       function tribe_events_genesis_crumb_filter( $crumb, $args ) {
       	global $post;
   
       	// Check for the event-archive class to grab the "archive" page
       	$classes = get_body_class();
       	if ( in_array( 'events-archive', $classes ) ) {
       		$event_archive = true;
       	}
       	// Grab archive crumb parameters
       	$archive_slug = get_option( 'eventsSlug', 'events' );
       	$archive_url = home_url( '/' ) . $archive_slug ;
       	$archive_title = to_title_case( $archive_slug );
   
       	if ( $event_archive == true ) {
   
       		$url   = get_home_url();
       		$link = sprintf( '<a href="%s" title="View %s">%s</a>', esc_attr( $url ), $args['home'], $args['home'] );
   
       		$crumbs[] = $link;
       		$crumbs[] = $archive_title ;
       		return $crumbs;
       	} else return $crumb;
   
       }
       function tribe_events_genesis_crumb_single( $crumb, $args ) {
       	global $post;
   
       	// Grab archive crumb parameters
       	$archive_slug = get_option( 'eventsSlug', 'events' );
       	$archive_url = home_url( '/' ) . $archive_slug ;
       	$archive_title = to_title_case( $archive_slug );
   
       	if( is_singular( 'tribe_events' ) ) {
       		$crumb = get_the_title();
       		return '<a href="' . $archive_url . '">' . $archive_title .  '</a>' . $args['sep'] . ' ' . $crumb;
       	} else return $crumb;
   
       }
   
       function to_title_case($title)
       // Converts $title to Title Case, and returns the result.
       {
       // Our array of 'small words' which shouldn't be capitalised if
       // they aren't the first word. Add your own words to taste.
       $smallwordsarray = array(
       'of','a','the','and','an','or','nor','but','is','if','then','else','when',
       'at','from','by','on','off','for','in','out','over','to','into','with'
       );
   
       // Split the string into separate words
       $words = explode(' ', $title);
   
       foreach ($words as $key => $word)
       {
       // If this word is the first, or it's not one of our small words, capitalise it
       // with ucwords().
       if ($key == 0 or !in_array($word, $smallwordsarray))
       $words[$key] = ucwords($word);
       }
   
       // Join the words back into a string
       $newtitle = implode(' ', $words);
   
       return $newtitle;
       }
   
       genesis();
       ```
   
 *  [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * (@barryhughes-1)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/genesis-integration-1/#post-4446010)
 * Thanks for sharing!
 *  [thamesidemedia](https://wordpress.org/support/users/thamesidemedia/)
 * (@thamesidemedia)
 * [12 years ago](https://wordpress.org/support/topic/genesis-integration-1/#post-4446019)
 * Perfect. This has really helped my integration of Genesis and the Events Calendar.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘genesis integration’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

## Tags

 * [genesis](https://wordpress.org/support/topic-tag/genesis/)

 * 4 replies
 * 4 participants
 * Last reply from: [thamesidemedia](https://wordpress.org/support/users/thamesidemedia/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/genesis-integration-1/#post-4446019)
 * Status: resolved