Created
June 6, 2013 01:54
-
-
Save ammist/5718774 to your computer and use it in GitHub Desktop.
If you are using the Events Calendar PRO with Community events submission with Genesis, you may run into an issue where the submission form is replicated in other widget areas where you are including posts or pages with content. This updated template file can be used to avoid this problem. Just save this code as page.php in your child theme. Thi…
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 | |
/* When we're using the event calendar community feature, we need to disable any | |
widget areas that might be displaying extra copies of the form. In theory Modern | |
Tribe will fix this in a future release, but, in the meantime... */ | |
function check_for_event_calendar_pro_router_page(){ | |
global $wp_query; | |
$page = get_queried_object(); | |
if ($page->post_type == 'wp_router_page'){ | |
remove_action('genesis_header', 'genesis_do_header'); | |
add_action('genesis_header', 'simple_header'); | |
// force full-width layout and disable breadcrumbs. | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); | |
// remore the posted_by and filed under parts | |
remove_action( 'genesis_before_post_content', 'genesis_post_info' ); | |
remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); | |
} | |
} | |
function simple_header(){ | |
echo '<div id="title-area">'; | |
do_action( 'genesis_site_title' ); | |
do_action( 'genesis_site_description' ); | |
echo '</div><!-- end #title-area -->'; | |
} | |
/* ----------------------- Render the page ----------------------*/ | |
add_action('wp_head', 'check_for_event_calendar_pro_router_page'); | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment