Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- This snippet will remove post-specific content from event pages when using Events Manager and Genesis
- To use this, simply create a new file and paste the entire contents of this file or add the code below to a present PHP file.
- See here for information on where to paste code - http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
- */
- function em_genesis_single_template($template){
- global $post;
- if( $post->post_type == EM_POST_TYPE_EVENT ){
- $hooks = array(
- 'genesis_before_entry',
- 'genesis_entry_header',
- 'genesis_before_entry_content',
- 'genesis_after_entry_content',
- 'genesis_entry_footer',
- 'genesis_after_entry',
- );
- foreach( $hooks as $hook ){
- remove_all_actions( $hook );
- }
- add_action( 'genesis_entry_header', 'genesis_entry_header_markup_open' , 5 );
- add_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
- add_action( 'genesis_entry_header', 'genesis_do_post_title' );
- }
- return $template;
- }
- add_filter('single_template','em_genesis_single_template');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement