Not finish loading of next post – single.php
-
I use “Ajax Load More” and “Ajax Load More: Previous Post”.
But loading effect will not finish at single.php.I think it is caused by Single.php or Repeater Templates.
Can you help me?single.php
<?php get_header(); ?> <div class="articleWrap"> <?php if (have_posts()): while (have_posts()): the_post(); echo do_shortcode('[ajax_load_more previous_post="true" previous_post_id="'.get_the_ID().'" post_type="post"]'); endwhile; endif; ?> </div> <!-- フッター --> <?php get_footer(); ?> <?php wp_footer(); ?> </body> </html>
Repeater Templates
<article id="post-<?php the_ID(); ?>" class="singlePage" itemscope itemtype="https://schema.org/Article"> <header> <!-- パンくず --> <?php get_template_part('breadcrumb'); ?> <h1 class="articleTitle" itemprop="name headline"><?php the_title(); ?></h1> <div class="excerpt" itemprop="description"><?php the_excerpt(); ?></div> <div class="articleInfo"> By <span><?php the_author_posts_link(); ?></span> on <time><?php echo get_the_date(); ?></time> <meta itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="<?php the_permalink(); ?>" itemscope /> <meta itemprop="author editor" itemtype="https://schema.org/Person" content="<?php the_author(); ?>"> <meta itemprop="datePublished" content="<?php the_date('Y-m-d'); ?>"> <meta itemprop="dateModified" content="<?php the_modified_date('Y-m-d'); ?>"/> </div> <div itemprop="publisher" itemscope itemtype="https://schema.org/Organization"> <div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject"> <meta itemprop="url" content="<?php echo esc_url(get_stylesheet_directory_uri()); ?>/images/logo.png"> <meta itemprop="width" content="300"> <meta itemprop="height" content="300"> </div> <meta itemprop="name" content="<?php bloginfo('name'); ?>"> </div> </header> <figure class="thumbnail" itemscope itemprop="image" itemtype="https://schema.org/ImageObject"> <?php if (has_post_thumbnail()) { $attachmentID = get_post_thumbnail_id(); $attachment = wp_get_attachment_image_src($attachmentID, 'large'); echo '<div style="background-image: url('.$attachment[0].');"></div>'; echo '<meta itemprop="url" content="'.$attachment[0].'">'; echo '<meta itemprop="width" content="'.$attachment[1].'">'; echo '<meta itemprop="height" content="'.$attachment[2].'">'; } ?> </figure> <!-- Ad --> <section class="adWide"> <?php if ( !has_tag('NoAds') ): ?> -- Google Adsense Code-- <?php endif; ?> </section> <div class="contents"> <!-- シェアボタン --> <aside class="articleSub"> <div class="shareButton"> <div class="twitter"> <a href="https://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>&via=DamongeNews&related=DamongeNews" target="_blank"><i class="fa fa-twitter fa-2x"></i></a> </div> <div class="facebook"> <a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" target="_blank"><i class="fa fa-facebook fa-2x"></i></a> </div> <div class="hatena"> <a href="https://b.hatena.ne.jp/entry/" class="hatena-bookmark-button" data-hatena-bookmark-layout="simple" title="このエントリーをはてなブックマークに追加"><img src="https://b.st-hatena.com/images/entry-button/[email protected]" alt="このエントリーをはてなブックマークに追加" width="30" height="30"></a> </div> <div class="pocket"> <a href="https://getpocket.com/edit?url=<?php the_permalink(); ?>"><i class="fa fa-get-pocket fa-2x"></i></a> </div> </div> <div class="shareCount"> <span> <?php if(function_exists('get_scc_twitter')) $countTw = get_scc_twitter(); if(function_exists('get_scc_facebook')) $countFb = get_scc_facebook(); //if(function_exists('get_scc_gplus')) $countGp = get_scc_gplus(); if(function_exists('get_scc_hatebu')) $countHb = get_scc_hatebu(); $counts = $countTw + $countFb + $countGp + $countHb; echo '<i class="fa fa-share-alt"></i>' .$counts; ?> <!-- <?php //echo 'Tw:'.$countTw.',Fb:'.$countFb.',Hb:'.$countHb; ?> --> </span> <span class="comment"><?php comments_number('<i class="fa fa-commenting-o"></i>', '<i class="fa fa-commenting-o"></i>1', '<i class="fa fa-commenting-o"></i>%'); ?></span> </div> </aside> <!-- 本文 --> <section class="articleMain" itemprop="articleBody"> <?php the_content(); ?> <!-- Ad --> <section id="bottomAd"> <div> <?php if ( !has_tag('NoAds') ): ?> -- Google Adsense Code-- <?php endif; ?> </div> <div> <script src="<?php echo home_url(); ?>/azlink/tinywidget.min.js"></script> <script type="text/javascript"> //<![CDATA[ AZlink.TinyWidget.sidebar({ associateId: 'd6l0g03-22', node: [ 'bestsellers/computers/2151982051', 'new-releases/videogames/2494234051', 'new-releases/books/2501045051', 'new-releases/hobby/2189356051', ], numItems: 1, imageFlags: [ 'SL220' ] }); //]]> </script> </div> </section> <!-- シェアボタン --> <div class="shareButton"> <div class="twitter"> <a href="https://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>&via=DamongeNews&related=DamongeNews" target="_blank"><i class="fa fa-twitter fa-2x"></i></a> </div> <div class="facebook"> <a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" target="_blank"><i class="fa fa-facebook fa-2x"></i></a> </div> <div class="hatena"> <a href="https://b.hatena.ne.jp/entry/" class="hatena-bookmark-button" data-hatena-bookmark-layout="simple" title="このエントリーをはてなブックマークに追加"><img src="https://b.st-hatena.com/images/entry-button/[email protected]" alt="このエントリーをはてなブックマークに追加" width="30" height="30"></a> </div> <div class="pocket"> <a href="https://getpocket.com/edit?url=<?php the_permalink(); ?>"><i class="fa fa-get-pocket fa-2x"></i></a> </div> <span class="comment"> <i class="fa fa-commenting-o fa-2x"></i> </span> </div> <aside class="aroundInfo"> <!-- コメント --> <a id="comments"></a> <?php if (comments_open()): ?> <div id="commentOverlay"></div> <div class="articleCommentBody"> <span id="commentClose" style="cursor: pointer;"><i class="fa fa-times-circle-o fa-2x"></i></span> <?php comments_template(); ?> </div> <?php endif; ?> <!-- 関連記事 --> <section class="related"> <?php if ( !has_tag('NoAds') ): ?> -- Google Adsense Code-- <?php endif; ?> <?php wp_related_posts()?> </section> </aside> </section> </div> </article>
Please help me. Thank you.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Not finish loading of next post – single.php’ is closed to new replies.