Added custom function similar to mtpleasant wow's.
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 6 Nov 2015 16:33:02 +0000 (11:33 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 6 Nov 2015 16:33:02 +0000 (11:33 -0500)
functions.php
single.php

index 891c1f5..6c31ae8 100644 (file)
@@ -145,6 +145,12 @@ register_nav_menus(array(
 //  'footer' => 'Footer'
 ));
 
+function is_post_type($type){
+    global $wp_query;
+    if($type == get_post_type($wp_query->post->ID)) return true;
+    return false;
+}
+
 if ( ! function_exists( 'feature_top_bar' ) ) {
   function feature_top_bar() {
       wp_nav_menu(array(
index e42435d..3c824b8 100644 (file)
@@ -1,7 +1,13 @@
 <?php get_header(); ?>
     <main class="blog-single">    
         <div class="row">
-               <div id="blog-posts-over" class="small-12 medium-9 columns">
+                <?php 
+            if (is_single() && is_post_type('ai1ec_event')){
+                echo '<div id="blog-posts-over" class="small-12 medium-11 medium-centered columns ai1ec-post">';
+            } else {
+                echo '<div id="blog-posts-over" class="small-12 medium-9 columns">';
+            }
+            ?>
                 <?php if(have_posts()) : while(have_posts()): the_post();?>
                 <div class="row blog-post-container">
                     <div class="small-11 small-centered columns">
@@ -48,7 +54,9 @@
                 <?php endif;?>
             </div>
             <?php 
-              //  get_template_part('parts/blog-sidebar-r');
+              if (is_single() && !is_post_type('ai1ec_event')){
+                get_template_part('parts/blog-sidebar-r');
+            } 
             ?>
         </div>
         <?php get_footer(); ?>