searchwp\query\per_page
Da: 4.0.0
Indice
Personalizza quanti risultati vengono restituiti per pagina.
Parametri
| Tipo | Parametro | Predefinito | Da |
|---|---|---|---|
| Intero | $per_page |
get_option( 'posts_per_page' ) |
4.0.0 |
| Array | $args |
Argomenti della query | 4.0.0 |
Esempi
All hooks should be added to your custom SearchWP Customizations Plugin.
Restituisci 12 risultati per pagina
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Return 12 results per page of SearchWP results. | |
| add_filter( 'searchwp\query\per_page', function( $per_page, $args ) { | |
| return 12; | |
| }, 30, 2 ); |

