Created
          October 6, 2014 17:10 
        
      - 
      
- 
        Save greenhornet79/972f40460d04703f5408 to your computer and use it in GitHub Desktop. 
    Add IssueM articles to an author's archive page
  
        
  
    
      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 issuem_post_author_archive( &$query ) | |
| { | |
| if ( $query->is_author ) | |
| $query->set( 'post_type', 'article' ); | |
| remove_action( 'pre_get_posts', 'issuem_post_author_archive' ); // run once! | |
| } | |
| add_action( 'pre_get_posts', 'issuem_post_author_archive' ); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment