S
S
skdon2015-10-30 12:42:30
WordPress
skdon, 2015-10-30 12:42:30

How to arrange "Show more" for a static Wordpress page?

Please help with the organization of dynamic content loading for a static page in Wordpress. Tried various plugins. On the page of records work. And on a static page they don't want to. Pagination on static is and works. Static page code:

<article>
        <?php $paged = (get_query_var('page')) ? get_query_var('page') : 1;
        $temp = $wp_query; $wp_query= null;
        $wp_query = new WP_Query(); $wp_query->query('showposts=3' . '&paged='.$paged);
        while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
        <h2><a href="<?php the_permalink(); ?>" title="Read more"><?php the_title(); ?></a></h2>
        <?php the_excerpt(); ?>
        <?php endwhile; ?>
       <?php wp_pagenavi(); ?>
        <?php wp_reset_postdata(); ?>
    </article>

I need to organize the loading of posts without reloading the page. Those. Let's say 10 records are displayed on the page. See more button at the bottom. When you click it, more records are loaded and added to the bottom of the page. Etc. as long as there are posts in the database.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pxRom, 2015-10-30
@pxRom

AJAX was invented to change the content of the page without reloading

S
sera2007, 2015-10-31
@sera2007

ajax-load-more plugin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question