I have $recent_posts array with a 'posts_per_page' that look like thah:

  $num_per_page = 3;
  $recent_posts = wp_get_recent_posts(array(
    'posts_per_page' => $num_per_page,
    'post_status'    => 'publish',
    'orderby'        => 'rand',
  foreach($recent_posts as $post) : ?>

I would like to add a button that can expand the posts amount in a 3 at a time in every click on it..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.