Jquery get post on multiple page
-
Hello, i’m bulding my first website and i made a menu where people can chose witch items they want to see. I displayed 25 items per page. My problem is when they chose an item exemple, Wood, well it only get all wood from the page 1 and not they other page…
here is my php code
<div id="les-photos" class="clearfix"> <?php //in page, get children of this page and display with custom field 'cf1'/ $parent_id = $posts[0]->ID; $args=array( 'post_parent' => $parent_id, 'post_type' => 'page', 'post_status' => 'publish', 'posts_per_page' => 24, 'caller_get_posts'=> 1, 'paged' => $paged ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <?php $meta = get_post_meta($post->ID, 'photo1', true); ?> <div class="<?php echo get_post_meta($post->ID, 'Type', true); ?>"> <div class="<?php echo get_post_meta($post->ID, 'Materiel', true); ?>"> <div class="<?php echo get_post_meta($post->ID, 'Style', true); ?>"> <div id="port-photo"> <a href="<?php the_permalink() ?>" id="produit-hover" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> <?php echo wp_get_attachment_image($meta, $size=array(150,150)); ?> </a> <div class="description"> <p><?php echo get_post_meta($post->ID, 'Type', true); ?> / <?php echo get_post_meta($post->ID, 'Materiel', true); ?></p> <h2 class="photo-style"><?php echo get_post_meta($post->ID, 'Style', true); ?></h2> </div> <!-- fin du div description --> </div> </div> </div> </div><!-- fin du port-photo --> <?php endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?> </div> <div id="bas-portfolio"> <?php # $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?> <?php query_posts("paged=$paged"); the_post(); ?> <?php include (TEMPLATEPATH . '/inc/nav.php' ); ?> <?php wp_reset_query(); ?> </div>and here is my jquery script
$(function() { $("#Cuisine").click(function() { $(".Cuisine").toggle(); }); }); $(function() { $("#Mobilier").click(function() { $(".Mobilier").toggle(); }); }); $(function() { $("#Vanité").click(function() { $(".Vanité").toggle(); }); }); $(function() { $("#Bois").click(function() { $(".Bois").toggle(); }); }); $(function() { $("#Stratifié").click(function() { $(".Stratifié").toggle(); }); }); $(function() { $("#Mélamine").click(function() { $(".Mélamine").toggle(); }); }); $(function() { $("#Polyester").click(function() { $(".Polyester").toggle(); }); }) $(function() { $("#laques").click(function() { $(".laques").toggle(); }); }) $(function() { $("#Classi").click(function() { $(".Classique").toggle(); }); }) $(function() { $("#Comptem").click(function() { $(".Comptemporain").toggle(); }); }) $(function() { $("#Transi").click(function() { $(".Transitionnel").toggle(); }); })Like i said this is my first website, so the code might not be perfect!
Thanks for your help!!
The topic ‘Jquery get post on multiple page’ is closed to new replies.