WordPressの投稿を出力してページング機能をつけようと試みています。
しかし、このようなバグが発生してしまいなかなか対処できずに困っています。
コードは下記になります。
正しい書き方のご教授をお願い致します。
お手数をおかけしますが、お力をお貸しください。
よろしくお願い致します。
<div class="blog_holder masonry_full_width masonry_infinite_scroll four_columns"> <div class="blog_holder_grid_sizer"></div> <div class="blog_holder_grid_gutter"></div> <?php $paged = get_query_var(''); ?></article><?php query_posts("posts_per_page=5&paged=$paged"); ?> <?php if (have_posts()) : while(have_posts()) : the_post(); ?> <article id="post-327" class="post-327 post type-post status-publish format-standard has-post-thumbnail hentry category-destination category-food tag-amazing tag-relaxing tag-spa"> <div class="post_image"> <a href="<?php echo get_permalink(); ?>"> <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'post-thumbnail'); } ?> </a> </a> </div> <div class="post_text"> <div class="post_text_inner"> <div class="post_info"> <div class="date"> Octorber 13, 2015 </div> <div class="post_category noto">カテゴリ <a href="" rel="category tag noto">カテゴリ</a>, <a href="" rel="category tag noto">カテゴリ</a> </div> </div> <h4 class="noto"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> </h4> <p class="post_excerpt noto"> <?/*php the_content(); */?> <?php echo mb_substr(strip_tags($post-> post_content),0,50).'...'; ?> <a href="/archives/<? echo $post->ID; ?>"> >> 記事を表示する</a> <? $length=100; $more='....'; $excerpt=''; /* function my_excerpt_mblength($length) { return 100; } add_filter('excerpt_mblength', 'my_excerpt_mblength'); // 本文からの抜粋末尾の文字列を指定する function my_auto_excerpt_more($more) { return '・・・'; } add_filter('excerpt_more', 'my_auto_excerpt_more'); // 抜粋末尾に個別投稿ページへのリンクを追加する function my_custom_excerpt_more($excerpt) { return $excerpt . '<a href="' . get_permalink($post->ID) . '"> >> 記事を表示する</a>'; } add_filter('get_the_excerpt', 'my_custom_excerpt_more'); */ ?> </p> <div class="read_more_wrapper clearfix"> <div class="blog_social_share_wrapper"> <div class="blog_share"> <div class="social_share_holder"> <a href="javascript:void(0)" target="_self"> <i class="social_share social_share_icon"></i> <span class="social_share_title">Share</span> </a> <div class="social_share_dropdown"> <ul> <li class="facebook_share"> <a class="share_link" href="#" onclick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=History+of+Brooklyn&p[summary]=No+one+rejects%2C+dislikes%2C+or+avoids+pleasure+itself%2C+because+it+is+pleasure%2C+but+because+those+who+do+not+know+how+to+pursue+pleasure+rationally+encounter+consequences+that+are+extremely+painful.+Nor+again+is+there+anyone+who+loves+or+pursues+or+desires+to+obtain+pain+of+itself.+No+one+rejects%2C+dislikes%2C+or+avoids+pleasure+itself%2C+because+it+is+pleasure%2C+but+because+those+who+do+not+know+how+to+pursue+pleasure+rationally+encounter+consequences+that+are+extremely+painful.&p[url]=http%3A%2F%2Fdemo.elated-themes.com%2Fborderland1%2Fhistory-of-brooklyn-2%2F&p[images][0]=http://demo.elated-themes.com/borderland1/wp-content/uploads/2015/03/bg-history-of-brooklyn.jpg', 'sharer', 'toolbar=0,status=0,width=620,height=280');"> <span class="social_network_icon social_facebook"></span> </a> </li> <li class="twitter_share"> <a class="share_link" href="#" onclick="popUp=window.open('http://twitter.com/home?status=http://demo.elated-themes.com/borderland1/history-of-brooklyn-2/', 'popupwindow', 'scrollbars=yes,width=800,height=400');popUp.focus();return false;"> <span class="social_network_icon social_twitter"></span> </a> </li> <li class="google_share"> <a class="share_link" href="#" onclick="popUp=window.open('https://plus.google.com/share?url=http%3A%2F%2Fdemo.elated-themes.com%2Fborderland1%2Fhistory-of-brooklyn-2%2F', 'popupwindow', 'scrollbars=yes,width=800,height=400');popUp.focus();return false"> <span class="social_network_icon social_googleplus"></span> </a> </li> <li class="tumblr_share"> <a class="share_link" href="#" onclick="popUp=window.open('http://www.tumblr.com/share/link?url=http%3A%2F%2Fdemo.elated-themes.com%2Fborderland1%2Fhistory-of-brooklyn-2%2F&name=History+of+Brooklyn&description=No+one+rejects%2C+dislikes%2C+or+avoids+pleasure+itself%2C+because+it+is+pleasure%2C+but+because+those+who+do+not+know+how+to+pursue+pleasure+rationally+encounter+consequences+that+are+extremely+painful.+Nor+again+is+there+anyone+who+loves+or+pursues+or+desires+to+obtain+pain+of+itself.+No+one+rejects%2C+dislikes%2C+or+avoids+pleasure+itself%2C+because+it+is+pleasure%2C+but+because+those+who+do+not+know+how+to+pursue+pleasure+rationally+encounter+consequences+that+are+extremely+painful.', 'popupwindow', 'scrollbars=yes,width=800,height=400');popUp.focus();return false"> <span class="social_network_icon social_tumblr"></span> </a> </li> <li class="pinterest_share"> <a class="share_link" href="#" onclick="popUp=window.open('http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fdemo.elated-themes.com%2Fborderland1%2Fhistory-of-brooklyn-2%2F&description=History of Brooklyn&media=http%3A%2F%2Fdemo.elated-themes.com%2Fborderland1%2Fwp-content%2Fuploads%2F2015%2F03%2Fbg-history-of-brooklyn.jpg', 'popupwindow', 'scrollbars=yes,width=800,height=400');popUp.focus();return false"> <span class="social_network_icon social_pinterest"></span> </a> </li> </ul> </div> </div> </div> </div> </div> </div> </div>
<div class="pnbt-area"> <strong>1</strong> <a class="float" href="/content/&per_page=15">2</a> <a class="float" href="/content/&per_page=15">></a> </div><?php endwhile; ?> <?php else: ?> <?php endif; ?>
</div> <!-- close div.content_inner --> </div> <!-- close div.content --> </div> <!-- paspartu_inner close div --> </div> <!-- paspartu_outer close div --> <?/* <div class="pagination"><span>Page 1 of 3</span><span class="current">1</span><a href='http://vt1.glnabi.com/blog/2' class="inactive">2</a><a href='http://vt1.glnabi.com/blog/3' class="inactive">3</a></div> */?> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div> <div class="blog_infinite_scroll_button"> <span data-rel="3"> <a href="http://demo.elated-themes.com/borderland1/blog-masonry/page/2/">Show more</a> </span> </div> </div> </div>
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。