diff -r 000000000000 -r d970ebf37754 wp/wp-content/themes/IN-MOTION-package-u1/in-motion/home.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wp/wp-content/themes/IN-MOTION-package-u1/in-motion/home.php Wed Nov 06 03:21:17 2013 +0000
@@ -0,0 +1,663 @@
+
+ 'page',
+ 'order' => 'ASC',
+ 'orderby' => 'menu_order',
+ 'posts_per_page' => '-1'
+ );
+$main_query = new WP_Query($args);
+$page_number=0;
+/*if( have_posts() ) : */
+ while ($main_query->have_posts()) : $main_query->the_post();
+
+ global $post;
+
+ $post_name = $post->post_name;
+
+ $title = $post->post_title;
+
+ $post_id = get_the_ID();
+
+ $content = get_the_content();
+
+ $show_page_in_menu = get_post_meta($post_id , 'show_page_in_menu' , true);
+
+ $pageTemplate= get_post_meta($post_id , 'page_template' , true);
+
+ $shortDesc = get_post_meta($post_id , 'short_desc' , true);
+
+ $page_number++;
+ $first_class='';
+ if($page_number == 1) {
+ $first_class=' firstPage';
+ }
+
+ if ($show_page_in_menu == 'Yes')
+ {
+
+ if ($pageTemplate == 'Home')
+ {
+ ?>
+
+
+ ';
+
+ echo '
';
+ echo '
';
+ echo '
';
+ echo '- All
';
+ $terms = get_terms("portfolio_categories");
+ $count = count($terms);
+ if ( $count > 0 ){
+
+ foreach ( $terms as $term ) {
+ echo '- '.$term->name.'
';
+
+ }
+ }
+ echo '
';
+
+
+ $args = array('post_type'=> 'portfolio', 'posts_per_page' => -1, 'order'=> 'DESC', 'orderby' => 'post_date' );
+ $posts = get_posts($args);
+ $idd=0;
+ if($posts) {
+
+ echo '
';
+ $itemCount = 0;
+ foreach($posts as $post)
+ {
+ $termlist="";
+ $itemClass='';
+ setup_postdata($post);
+ $idd++;
+
+ $terms = get_the_terms( $post->ID, 'portfolio_categories' );
+ $term_list = '';
+ if( is_array($terms) ) {
+ foreach( $terms as $term ) {
+ $term_list .= $term->slug;
+ $term_list .= ' ';
+ }
+ }
+ $itemCount++;
+ if(($itemCount % 5) == 0) {
+ $itemClass='class="last"';
+ }
+ else {
+ $itemClass='';
+ }
+
+
+ $link=get_permalink();
+
+ ?>
+
+ - data-id="id-" data-type="" >
+ ID ), 'single-post-thumbnail' ); ?>
+
+
+
+
+
+
+
+
+
+
+ ';
+ } //end if($posts)
+ ?>
+
+
+
+ ';
+ foreach($posts as $post)
+ {
+ $termlist="";
+ setup_postdata($post);
+ $idd++;
+ $publish=true;
+ $postType = get_post_meta($post->ID, 'post_type_selected' , true);
+ if($postType == 'News'){$publish=false;}
+
+ $terms = get_the_category($post->ID);
+ $term_list = '';
+
+ if( is_array($terms) ) {
+ foreach( $terms as $term ) {
+ // if($term->cat_name == 'News'){$publish=false;}
+ $term_list .= $term->cat_name;
+ $term_list .= ' ';
+ }
+ }
+ if($publish==true)
+ {
+ $itemCount++;
+ if(($itemCount % 2) == 0) {
+ $itemClass=' last';
+ }
+ else {
+ $itemClass='';
+ }
+
+ echo '
';
+ echo '
';
+ echo '
'. get_the_time('d').' '. get_the_time('M').'
';
+ echo '
';
+ echo '
';
+ get_permalink();
+
+ ?>
+
+
+ ';
+ echo '
';
+ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
+ ?>
+
; ?>/scripts/timthumb.php?src=<?php echo $image[0]; ?>&h=181&w=465&zc=1)
+
';
+ }
+ }
+ echo '
';
+ }
+ ?>
+
+
+
+
+
+
';
+ }
+ ?>
+
+ ';
+ echo '
'.$title.'
';
+ if (!empty($shortDesc)) {
+ echo '
}'.$shortDesc.'
';
+ }
+ echo '
';
+
+ $args = array('post_type'=> 'post', 'posts_per_page' => -1, 'order'=> 'DESC', 'orderby' => 'post_date' );
+ $posts = get_posts($args);
+ $idd=0;
+ if($posts) {
+ $itemCount = 0;
+ $itemClass='';
+ echo "";
+ foreach($posts as $post)
+ {
+ $termlist="";
+ setup_postdata($post);
+ $idd++;
+ $publish=false;
+ $postType = get_post_meta($post->ID, 'post_type_selected' , true);
+ if($postType == 'News'){$publish=true;}
+
+ $terms = get_the_category($post->ID);
+ $term_list = '';
+
+ if( is_array($terms) ) {
+ foreach( $terms as $term ) {
+ // if($term->cat_name == 'News'){$publish=true;}
+ $term_list .= $term->cat_name;
+ $term_list .= ' ';
+ }
+ }
+ if($publish==true)
+ {
+ $itemCount++;
+ //if ($itemClass== ' last') { echo '
';}
+ if(($itemCount % 3) == 0) {
+ $itemClass=' last';
+ }
+ else {
+ $itemClass='';
+ }
+ echo '
';
+ echo '
';
+ echo '
'. get_the_time('d').' '. get_the_time('M').'
';
+ echo '
';
+ echo '
';
+ echo '
'.get_the_title().'
';
+ $content = get_post($post->ID)->post_content;
+ /*f (strlen($content) > 103)
+ {
+ $content = substr($content,0,100).'...';
+ }
+ */
+ echo '
'.$content.'
';
+ echo '
';
+
+ }
+ }
+ echo '
';
+ }
+ ?>
+ ';
+ echo '
'.$title.'
';
+ if (!empty($shortDesc)) {
+ echo '
}'.$shortDesc.'
';
+ }
+ echo '
';
+ the_content();
+ echo '';
+ }
+ ?>
+
+
+