Last active
February 23, 2016 13:14
-
-
Save carasmo/70a4fd9cc27d5822e03a to your computer and use it in GitHub Desktop.
Paginate author page: goes in your child theme functions.php file (you can use other conditions, such as `if (!is_admin() && is_archive( 'name-of-cpt' ) )` for pagination on Custom Post Types.
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 | |
//don't include this | |
function author_posts_per_page( $query ) { | |
if (!is_admin() && is_author() ) | |
$query->set( 'posts_per_page', 5 ); | |
} | |
add_filter('parse_query', 'author_posts_per_page'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well, I thought ticks would work for the description field, anyway:
if (!is_admin() && is_archive( 'name-of-cpt' ) )