Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php WP类别的无限滚动不';不要加载所有元素_Php_Jquery_Wordpress - Fatal编程技术网

Php WP类别的无限滚动不';不要加载所有元素

Php WP类别的无限滚动不';不要加载所有元素,php,jquery,wordpress,Php,Jquery,Wordpress,我为一位摄影师建立了一个网站&她想用她的博客类别作为她的作品集,效果很好,只是我使用的无限滚动功能无法加载摘录的所有内容 它省略的两项是文章缩略图(图像)和作为文章之间分隔符的水平行 任何关于这方面的见解都是值得赞赏的-我使用的是Paul Irish的无限滚动插件&分类摘录被称为: <?php get_header(); ?> <section id="content" role="main"> <header class="header"> <h1 c

我为一位摄影师建立了一个网站&她想用她的博客类别作为她的作品集,效果很好,只是我使用的无限滚动功能无法加载摘录的所有内容

它省略的两项是文章缩略图(图像)和作为文章之间分隔符的水平行

任何关于这方面的见解都是值得赞赏的-我使用的是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(); ?>



移动到条目模板中。

@leftside,我添加了一些代码以供参考。您是否可以链接该页面?如果不可能,我会说首先检查AJAX请求的响应,看看问题发生在哪里。(在回复中,或在将职位添加到列表中时)。这稍微缩小了可能性,可能仍然很难找到,我看你的代码中没有立即出现的错误。@FlorianRachor,link补充了已经存在的图像:它们是插入到帖子中还是特色图像?@leftside,这些是特色图像,或者是“post”缩略图。我还注意到,在进行调整之前,使用jQuery附加的一些项目也没有通过博客文章上的无限滚动来完成,我通过将它们合并到条目内容文件中解决了这个问题。
<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 />