Created
December 3, 2013 06:21
-
-
Save amdrew/7764705 to your computer and use it in GitHub Desktop.
Overwrite amount of downloads per category
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 | |
| function my_child_theme_filter_taxonomy( $query ) { | |
| if ( is_admin() || ! $query->is_main_query() ) | |
| return; | |
| if( $query->is_tax( 'download_category' ) ) { | |
| $query->set( 'posts_per_page', 50 ); | |
| return; | |
| } | |
| } | |
| add_action( 'pre_get_posts', 'my_child_theme_filter_taxonomy' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment