Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ini untuk Keseluruhan (satu setingan untuk semua)
- Ini untuk ARCHIEVE:
- function wpsites_query( $query ) {
- if ( $query->is_archive() && $query->is_main_query() && !is_admin() ) {
- $query->set( 'posts_per_page', 100 );
- }
- }
- add_action( 'pre_get_posts', 'wpsites_query' );
- Ini untuk TAGS:
- function tagwpsites_query( $query ) {
- if ( $query->is_tag() && $query->is_main_query() && !is_admin() ) {
- $query->set( 'posts_per_page', 100 );
- }
- }
- add_action( 'pre_get_posts', 'tagwpsites_query' );
- =================
- ini per bagian:
- function num_posts_archive_project_ie($query) {
- if (!is_admin() && $query->is_archive('projects-ie') && $query->is_main_query()) {
- $query->set('posts_per_page', 6);
- }
- return $query;
- }
- >> projects-ie : nama pages yang diberikan
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement