상품 전체보기 페이지 인데요...
(테스트 중인 페이지 : http://andparty.jp/products_test)
<!-- にっぽん元気マーケット -->
요 아랫부분만 페이징 해서... 넘기고 싶은데....
(페이징 코드는 넣었습니다)
첫번째 페이지는 잘 표시되는데
두번째 페이지로 넘어가면,
윗부분에 있는 <!-- andpartyセレクト --> 요 부분 상품이 사라집니다...
이걸 어떻게 설정을 해주면 아래부분의 페이지가 넘어가도 윗부분은 고정으로 나올 수 있을까요? ㅠ
(템플릿을 수정하거나, 아니면 고정페이지 글 내용 안에 코드를 써 넣는 방법은 없을까요?)
아래 코드인데요...
Copy
<?phpget_header(); ?><div class="page_titlearea "> <div class="tit_box"> <h2><img src="<?php echo home_url(); ?>/common/img/products/h2_tit01.png" alt="andparty SHOP andpartySHOPの商品をご紹介します" /></h2> <div class="socialbtn"> <?php wp_social_bookmarking_light_output_e(null, get_permalink(), the_title("", "", false)); ?> </div> </div></div><nav class="path_page"> <ul> <li><a href="#">HOME</a></li> <li class="this_page">andparty SHOPのご紹介(テスト)</li> </ul></nav><!--wrap--><div id="wrap"> <h3>andpartySHOPとは</h3><?php if(have_posts()): while(have_posts()): the_post(); ?><?php the_content(); ?><?php endwhile; endif; ?><!-- andpartyセレクト --><h3>andpartyセレクト</h3><div class="list_mei"><?php if (have_posts()) : query_posts('posts_per_page=20&cat=5&paged='.$paged); ?><?php while (have_posts()) : the_post(); ?><div class="item_box new_item"><?php$thumbnail_id = get_post_thumbnail_id($post->ID);$image = wp_get_attachment_image_src( $thumbnail_id, 'full' );$src = $image[0];$width = $image[1];$height = $image[2];//新規登録時のnew画像 if(get_field('new_item')) : $attachment_id_new = get_field('new_item'); $size_new = "full"; // (thumbnail, medium, large, full or custom size) $image_new = wp_get_attachment_image_src( $attachment_id_new, $size_new ); $attachment_new = get_post( get_field('new_item') ); $alt_new = get_post_meta($attachment_new->ID, '_wp_attachment_image_alt', true); $image_title_new = $attachment_new->post_title; endif;?><a class="heightLine-group1" href="<?php the_permalink();?>"> <?php if(get_field('new_item')) : echo '<img src="'.$image_new[0].'" width="'.$image_new[1].'" height="'.$image_new[2].'" alt="'.$alt_new.'" title="'.$image_title_new.'" class="new_item_img">'; endif; ?> <img src="<?php echo $image[0]; ?>" width="156" height="156" alt="<?php echo $alt; ?>" title="<?php echo $image_title; ?>" /> <span><?php the_title();?></span></a></div><?php endwhile; ?></div><!--list_mei end--><?php wp_reset_query();endif; ?><!-- にっぽん元気マーケット --> <h3>にっぽん元気マーケット</h3> <div class="list_mei"><?php if (have_posts()) : query_posts('posts_per_page=20&cat=186&paged='.$paged); ?><?php while (have_posts()) : the_post(); ?><div class="item_box new_item"><?php$thumbnail_id = get_post_thumbnail_id($post->ID);$image = wp_get_attachment_image_src( $thumbnail_id, 'full' );$src = $image[0];$width = $image[1];$height = $image[2];//新規登録時のnew画像 if(get_field('new_item')) : $attachment_id_new = get_field('new_item'); $size_new = "full"; // (thumbnail, medium, large, full or custom size) $image_new = wp_get_attachment_image_src( $attachment_id_new, $size_new ); $attachment_new = get_post( get_field('new_item') ); $alt_new = get_post_meta($attachment_new->ID, '_wp_attachment_image_alt', true); $image_title_new = $attachment_new->post_title; endif;?><a class="heightLine-group2" href="<?php the_permalink();?>"> <?php if(get_field('new_item')) : echo '<img src="'.$image_new[0].'" width="'.$image_new[1].'" height="'.$image_new[2].'" alt="'.$alt_new.'" title="'.$image_title_new.'" class="new_item_img">'; endif; ?> <img src="<?php echo $image[0]; ?>" width="156" height="156" alt="<?php echo $alt; ?>" title="<?php echo $image_title; ?>" /> <span><?php the_title();?></span></a></div><?php endwhile; ?></div><!--list_mei end--><!--page_nav--><div class="page_nav"><?php global $wp_rewrite;$paginate_base = get_pagenum_link(1);if (strpos($paginate_base, '?') || ! $wp_rewrite->using_permalinks()) { $paginate_format = ''; $paginate_base = add_query_arg('paged', '%#%');} else { $paginate_format = (substr($paginate_base, -1 ,1) == '/' ? '' : '/') . user_trailingslashit('page/%#%/', 'paged');; $paginate_base .= '%_%';}echo paginate_links( array( 'base' => $paginate_base, 'format' => $paginate_format, 'total' => $wp_query->max_num_pages, 'mid_size' => 5, 'current' => ($paged ? $paged : 1),)); ?></div><!--page_nav end--><?php wp_reset_query();endif; ?></div><!--wrap end--><?php get_footer(); ?>
답변 2개 / 댓글 4개
채택된 답변
+20 포인트
2014-12-22 (월) 17:30:47
확실한 것은 테스트를 해보지 않아서 모르겠지만 대략적인 코드를 보니
아래처럼 수정이 되어야 하지 않을까 싶습니다.
Copy
<h3>andpartyセレクト</h3><div class="list_mei"> <?php if (have_posts()) : query_posts('posts_per_page=20&cat=5'); ?><?php while (have_posts()) : the_post(); ?>
&paged='.$paged 부분 때문에 문제가 되는 듯 하니 제거해 보시기 바랍니다.
답변에 대한 댓글 3개
nanati
2014-12-22 (월) 17:33:30
어떻게 하든 이것좀 해결해드리고 환심좀 사려고 했는데 편리님이 앞길을 막네요. 맛있는 것은 제게 주는 걸로~1
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.
한국에 또 가게 되면 더 맛있는거 사가지고 갈게요 ㅠ ㅠ