Title: Pagebuilder Framework Query Question
Last modified: July 28, 2021

---

# Pagebuilder Framework Query Question

 *  [jinegev](https://wordpress.org/support/users/jinegev/)
 * (@jinegev)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/pagebuilder-framework-query-question/)
 * Hello ,
 * I didnt find any help on their website so i hope to find it here, my question
   is how to increase the amount of posts in this particular code snippet -> <?php
   while ( have_posts() ) : the_post(); ?> i guess that this is the output
    <?php
   if( have_posts() ) : ?> -> and this can be used to controll the output
 * Thank you in advance
 * <?php do_action( ‘wpbf_main_content_open’ ); ?>
    <?php if( have_posts() ) : ?
   > <?php wpbf_archive_header(); ?> <?php do_action( ‘wpbf_before_loop’ ); ?> <?
   php while ( have_posts() ) : the_post(); ?> <?php get_template_part( ‘inc/template-
   parts/article’ ); ?> <?php endwhile; ?> <?php do_action( ‘wpbf_after_loop’ );?
   > <?php else : ?> <?php get_template_part( ‘inc/template-parts/article-none’ );?
   > <?php endif; ?> <?php do_action( ‘wpbf_main_content_close’ ); ?>
    -  This topic was modified 4 years, 10 months ago by [jinegev](https://wordpress.org/support/users/jinegev/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Jenish Shrestha](https://wordpress.org/support/users/jenish11/)
 * (@jenish11)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/pagebuilder-framework-query-question/#post-14709737)
 * I think this is a main query. We can modify the main query parameter by using
   pre_get_post hook.
 * [https://wordpress.stackexchange.com/questions/47683/using-pre-get-posts-to-set-posts-per-page-how-do-i](https://wordpress.stackexchange.com/questions/47683/using-pre-get-posts-to-set-posts-per-page-how-do-i)
 *  Thread Starter [jinegev](https://wordpress.org/support/users/jinegev/)
 * (@jinegev)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/pagebuilder-framework-query-question/#post-14710284)
 * Thank you !!! who thought that all you need is 1 line like $query->set(‘posts_per_page’,
   xxx); in functions php
 * here is a solution
 * add_action( ‘pre_get_posts’, ‘my_change_sort_order’);
    function my_change_sort_order(
   $query){ if(is_archive()): is_post_type_archive( $post_type ) //Set the order
   ASC or DESC $query->set( ‘order’, ‘ASC’ ); //Set the orderby $query->set( ‘orderby’,‘
   title’ ); //Set the amount of post $query->set(‘posts_per_page’, xxx); endif;};`
    -  This reply was modified 4 years, 10 months ago by [jinegev](https://wordpress.org/support/users/jinegev/).
    -  This reply was modified 4 years, 10 months ago by [jinegev](https://wordpress.org/support/users/jinegev/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Pagebuilder Framework Query Question’ is closed to new replies.

## Tags

 * [beginner](https://wordpress.org/support/topic-tag/beginner/)
 * [question](https://wordpress.org/support/topic-tag/question/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [jinegev](https://wordpress.org/support/users/jinegev/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/pagebuilder-framework-query-question/#post-14710284)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
