簡體   English   中英

WP類別的無限滾動不會加載所有元素

[英]Infinite scrolling of WP categories doesn't load all elements

我為攝影師建立了一個網站,她想將自己的博客類別用作自己的作品集,但效果很好,除了我正在使用的無限滾動功能不會加載摘錄的所有內容。

它忽略的兩個項目是帖子縮略圖(圖像)和用作帖子之間分隔符的水平行。

對此有任何見解,我們將不勝感激-我使用的是Paul Irish的無限滾動插件,並且類別摘錄的調用方式如下:

<?php get_header(); ?>
<section id="content" role="main">
<header class="header">
<h1 class="entry-title"><!-- <?php _e( 'Category Archives: ', 'themename' ); ?> --> <?php single_cat_title(); ?></h1>
<?php if ( '' != category_description() ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . category_description() . '</div>' ); ?>
</header>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?><div class="cat-thumbs align-right"><?php the_post_thumbnail(); ?></div>
<?php get_template_part( 'entry' ); ?>
<hr />
<?php endwhile; endif; ?>
<?php get_template_part( 'nav', 'below' ); ?>
</section>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

這是條目模板:

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<?php if ( is_singular() ) { echo '<h1 class="entry-title">'; } else { echo '<h2 class="entry-title">'; } ?><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a><?php if ( is_singular() ) { echo '</h1>'; } else { echo '</h2>'; } ?><?php edit_post_link(); ?>
<?php if ( !is_search() ) get_template_part( 'entry', 'meta' ); ?>
</header>
<?php get_template_part( 'entry', ( is_archive() || is_search() ? 'summary' : 'content' ) ); ?>
<?php if ( !is_search() ) get_template_part( 'entry-footer' ); ?>
</article>

供參考,這是我如何稱呼博客摘錄的方式,這沒有問題:

<section class="entry-content">
<a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><div class="cat-thumbs align-right"><?php the_post_thumbnail(); ?></div></a>
<?php the_excerpt(); ?>
<em><p>
<?php comments_number( '0 comments', '1 comment', '% comments' ); ?>.
</p></em>
<div class="entry-links"><?php wp_link_pages(); ?></div>
</section>
<hr />

鏈接到示例

移動<div class="cat-thumbs align-right"><?php the_post_thumbnail(); ?></div> <div class="cat-thumbs align-right"><?php the_post_thumbnail(); ?></div><hr>進入條目模板。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM