0
我将WordPress博客文章加载到我的网站上的静态PHP页面中。这里只是相关的代码部分。目前,只有3篇博客文章出现,但是我希望每点击一下按钮就能载入3篇博文。最后,当没有更多的帖子加载时,在id = theend中显示文本(我正在使用jquery)。谢谢。如何通过点击按钮来增加PHP变量中的整数?
<?php require($_SERVER['DOCUMENT_ROOT'] . '/blog/wp-load.php'); ?>
<?php
global $post;
$args = array('posts_per_page' => 3);
<div class="row">
// here is where the 3 posts (title, img, etc.) load
</div>
<?php endforeach; ?>
/////////////
<span id="theend" style="display:none">No more posts to display</span>
<button class="btn">Read More</button>