Undefined
By: Guest | Date: Jun 12 2012 10:05 | Format: PHP | Expires: never | Size: 3.67 KB | Hits: 1050
- <?php get_header(); ?>
- <?php global $query_string;
- $args = array_merge( $wp_query->query, array( 'posts_per_page' => 1, 'post_type' => 'aanbieders' ) );
- query_posts( $args );
- ?>
- <?php if ( have_posts() ) : ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php $activepost = $post->ID; ?>
- <?php endwhile; ?>
- <?php endif;
- wp_reset_query(); ?>
- <script type="text/javascript">
- $j(document).ready(function(){
- $j(".aanbieders-lijst").on("click", ".clickr", function(event){
- $j("#aanbieder-result").load( event.target.href );
- $j('.aanbieders-lijst li').removeClass('active');
- $j(this).parent().addClass('active');
- return false;
- });
- });
- </script>
- <ul class="colorbar big">
- <li class="orange"> </li>
- <li class="green"> </li>
- <li class="purple"> </li>
- <li class="blue"> </li>
- </ul>
- <div class="aanbieders-page group">
- <div class="kruimelpad">
- af
- </div>
- <?php global $query_string;
- $page = $_GET['page'];
- $args = array_merge( array( 'post_per_page' => 9, 'post_type' => 'aanbieders', 'paged' => $page), $wp_query->query );
- query_posts( $args );
- $count_posts = wp_count_posts('aanbieders');
- $nextpage = $page+1;
- $prevpage = $page-1;
- ?>
- <div class="list col-left">
- <ul class="aanbieders-lijst">
- <?php if ( have_posts() ) : ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php
- // CUSTOM FIELDS
- $subtitle = get_post_meta($post->ID, '_cmb_subtitel', true);
- if($post->ID == $activepost){
- $class = ' class="active"';
- }else{
- $class = '';
- }
- ?>
- <li<?php echo $class; ?>><a href="<?php the_permalink(); ?>" class="clickr"> </a><h2><?php the_title();?></h2>
- <h3 class="subtitle"><?php echo $subtitle; ?></h3>
- </li>
- <?php endwhile; ?>
- <?php else: ?>
- NO POSTS! GRRR.
- <?php endif; ?>
- </ul>
- <div class="pagination">
- <ul>
- <li>
- <?php
- print "$prevpage | $nextpage | $pager"; ?>
- </li>
- <li class="prev">
- <?php
- if($prevpage >= 0){
- echo '<a href="?page='.$prevpage.'">vorige</a>';
- }
- ?>
- </li>
- <li class="next">
- <?php
- if($nextpage >= $pager){
- echo '<a href="?page='.$nextpage.'">volgende</a>';
- }
- ?>
- </li>
- </ul>
- </div>
- </div>
- <div id="aanbieder-result" class="aanbieder col-right">
- <?php global $query_string;
- $args = array_merge( $wp_query->query, array( 'posts_per_page' => 1, 'post_type' => 'aanbieders' ) );
- query_posts( $args );
- ?>
- <?php if ( have_posts() ) : ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php
- // CUSTOM FIELDS
- $subtitle = get_post_meta($post->ID, '_cmb_subtitel', true);
- $beschrijving = get_post_meta($post->ID, '_cmb_beschrijving', true);
- $image1 = get_final_imgUrl($post->ID, '_cmb_image1', '570x240');
- $image2 = get_final_imgUrl($post->ID, '_cmb_image2', '570x240');
- $image3 = get_final_imgUrl($post->ID, '_cmb_image3', '570x240');
- ?>
- <article class="aanbieder">
- <header>
- <h1><?php the_title(); ?></h1>
- <h2><?php echo $subtitle; ?></h2>
- </header>
- <?php echo $beschrijving; ?>
- <div class="aanbieder-slider">
- <a id="prevslide" class="next-prev"> </a>
- <div class="aanbieder-beelden">
- <img src="<?php echo $image1; ?>" alt="<?php the_title(); ?>" />
- <img src="<?php echo $image2; ?>" alt="<?php the_title(); ?>" />
- <img src="<?php echo $image3; ?>" alt="<?php the_title(); ?>" />
- </div>
- <a id="nextslide" class="next-prev"> </a>
- </div>
- </article>
- <?php endwhile; ?>
- <?php endif; ?>
- </div>
- </div>
- <?php get_footer(); ?>
Latest pastes
1 days ago
3 days ago
3 days ago
4 days ago
5 days ago