Php WP#u查询+;无限卷轴
我在wordpress上制作我的新博客模板时结巴了。我有以下query/php代码:Php WP#u查询+;无限卷轴,php,jquery,wordpress,infinite-scroll,Php,Jquery,Wordpress,Infinite Scroll,我在wordpress上制作我的新博客模板时结巴了。我有以下query/php代码: echo '<div id="posts-container" class="fusion-blog-layout-medium fusion-blog-infinite fusion-posts-container-infinite fusion-blog-archive fusion-clearfix">'; $args = array( 'post_type' => 'era', 'p
echo '<div id="posts-container" class="fusion-blog-layout-medium fusion-blog-infinite fusion-posts-container-infinite fusion-blog-archive fusion-clearfix">';
$args = array( 'post_type' => 'era', 'post_status' => array('publish', 'future'), 'paged' => $paged );
$custom_query = new WP_Query($args);
while($custom_query->have_posts()) : $custom_query->the_post();
$post_classes = $post_class . ' ' . $alignment_class . ' ' . $thumb_class . ' post fusion-clearfix';
ob_start();
post_class( $post_classes );
$post_classes = ob_get_clean();
echo '<article id="post-' . get_the_ID() . '" ' . $post_classes . '>';
get_template_part( 'new-slideshow' );
echo '<div class="fusion-post-content koncert post-content">';
echo ( '<h2 class="entry-title fusion-post-title" data-fontsize="18" data-lineheight="27"><a href="' . get_post_permalink( '','','true') . '">' .get_the_title() . '</a></h2>' );
if ( get_field( "data_i_miejsce_koncertu", get_the_ID() ) ) {
echo ( '<div class="lista-koncert-podtytul">' . get_field( "data_i_miejsce_koncertu", get_the_ID() ) . '</div>' );
}
echo '<div class="fusion-post-content-container">';
do_action( 'avada_blog_post_content' );
if ( get_field( "opis", get_the_ID() ) ) {
echo '<div class="lista-koncert-opis">' . wp_trim_words(get_field( "opis", get_the_ID() ), 60, ' [...]') . '<br><br><a href="' . get_post_permalink( '','','true') . '">Zobacz więcej ></a></div>';
}
echo '</div>';
echo '</div>'; // End post-content.
echo '</article>';
endwhile;
wp_reset_postdata(); // reset the query
echo '</div>';
echo';
$args=array('post_type'=>'era'、'post_status'=>array('publish'、'future')、'paged'=>$paged);
$custom\u query=新的WP\u查询($args);
而($custom_query->have_posts()):$custom_query->the_post();
$post_classes=$post_classes''$“类对齐”$“大拇指课。”融合后clearfix';
ob_start();
邮班(邮班);
$post_classes=ob_get_clean();
回声');
if(get_字段(“data_i_miejsce_koncertu”,get_ID())){
echo(“”.get_字段(“data_i_miejsce_koncertu”,get_ID())。”);
}
回声';
do_action(‘avada_blog_post_content’);
如果(获取字段(“opis”,获取ID()){
回显“”。wp_trim_单词(获取字段(“opis”,获取ID()),60,“[…]”);
}
回声';
回显“”;//结束文章内容。
回声';
结束时;
wp_reset_postdata();//重置查询
回声';
我希望实现的是不进行常规分页(我已经从模板中删除了控件),但我希望使用jquery无限滚动脚本。但老实说,我甚至不知道如何开始;/主要是因为互联网上没有那么多的实例/教程。。感谢您提供的提示您需要使用javascript才能使infinte滚动正常工作。 基本上你需要的是:
?>
谢谢但教程链接描述了我希望通过函数实现这一点的场景。如何通过模板文件实现这一点?