Unable to make changes to single event page
-
I really messed up by applying if else if condition in
single-ai1ec_event.php file.
I have different three footers for different subject and i categorized events accordingly.
For example i have three different event categories having ids 38, 39 and 40.
I want different header and footer when their single events displays.
on single-ai1ec_event.php template file i made so many changes but only first condition is true.
Its showing header & footer for category 38 to all other categories events.
Same conditional statements i applied in other template is working.<?php if (is_page(156) || in_array(156, $post->ancestors)) { // Beachmenu condition here you can edit ?> <?php get_footer('beach'); ?> <?php } elseif (is_page(161) || in_array(161, $post->ancestors)) { ?> <?php get_footer('night'); ?> <?php } elseif (is_page(160) || in_array(160, $post->ancestors)) { ?> <?php get_footer('after'); ?> <?php } else { ?> <?php get_footer(); } ?>
In single-ai1ec_event.php file i am using below code
<?php global $ai1ec_events_helper; $args=array( 'post_type' => 'ai1ec_event', 'taxonomy' => 'events_categories', 'term_id' => $term_id ); $post = new WP_Query( $args ); if ( $term_id = 38 ) { include(TEMPLATEPATH . '/single-beach.php'); } elseif ( $term_id = 39 ) { include(TEMPLATEPATH . '/single-night.php'); } elseif ( $term_id = 40 ) { include(TEMPLATEPATH . '/single-after.php'); } ?>
Sometime all conditions showign true and sometime only first condtion is true for all event single page.
Need your help
#mysite
and see on each event page. Reply me as soon as possibleI love this great plugin but i have inconsistent footers.
Please Help me in this case.Thanks
- The topic ‘Unable to make changes to single event page’ is closed to new replies.