Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_template_parts( array( 'parts/shared/html-header', 'parts/shared/header-home' ) ); ?>
- <script type="text/javascript">
- jQuery('#PaginationExample a').live('click', function(e){ //check when pagination link is clicked and stop its action.
- e.preventDefault();
- var link = jQuery(this).attr('href'); //Get the href attribute
- jQuery('#contentInner').fadeOut(900, function(){ //fade out the content area
- jQuery("#loader").show(); // show the loader animation
- }).load(link + ' #contentInner', function(){ jQuery('#contentInner').fadeIn(500, function(){ //load data from the content area from paginator link page that we just get from the top
- jQuery("#loader").hide(); //hide the loader
- }); });
- });
- </script>
- <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('home')) : ?>
- [ do default stuff if no widgets ]
- <?php endif; ?>
- <div class="featured span-16 last">
- <?php get_template_parts( array( 'featured' ) ); ?>
- </div>
- <hr>
- <?php
- $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- $args = array(
- 'post_type' => projects,
- 'posts_per_page' => 6,
- 'post__not_in' => $do_not_duplicate,
- 'caller_get_posts' => 1,
- 'paged' => $paged
- );
- query_posts($args);
- ?>
- <div id='mycontent'>
- <div class="latest-projects" id="contentInner" style="min-height: 500px; position: relative;">
- <h2>Latest Projects</h2>
- <?php
- $my_query = new WP_Query( $args );
- if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post();
- $do_not_duplicate[] = $post->ID; ?>
- <div class="post-<?php echo $count; ?> span-8 projects" id="post post-<?php the_ID(); ?>">
- <div class="preview">
- <?php if ( has_post_thumbnail()) : ?>
- <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
- <?php the_post_thumbnail('span-8'); ?>
- </a>
- <?php endif; ?>
- </div>
- <div class="article-over" >
- <div class="project-meta" style="position: relative;">
- <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
- <?php
- $terms = wp_get_post_terms($post->ID, $taxonomies = array('uitingen', 'clients'));
- $count = count($terms);
- if ( $count > 0 ) {
- foreach ( $terms as $term ) {
- echo $term->name . "<br> ";
- }
- }
- ?>
- </a>
- </div>
- </div>
- </div>
- <?php endwhile; ?>
- <!-- pagination -->
- <div class="span-24 pagination" id="PaginationExample" style=" display: block; float: left; bottom: 0px; position: absolute;">
- <div class="center"><?php pagination(); ?></div>
- </div>
- <?php else : ?>
- <!-- No posts found -->
- <?php endif; ?>
- </div>
- </div>
- <?php get_template_parts( array( 'parts/shared/footer','parts/shared/html-footer') ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement