Created
          August 18, 2025 14:03 
        
      - 
      
- 
        Save wp-seopress/e9bc0d2d7a75347dd89d04ded794694f to your computer and use it in GitHub Desktop. 
    Filter taxonomies to watch for automatic redirections
  
        
  
    
      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
    
  
  
    
  | add_filter('seopress_watch_taxonomy_for_redirects', 'sp_watch_taxonomy_for_redirects', 10, 3); | |
| function sp_watch_taxonomy_for_redirects($should_watch, $taxonomy_name, $taxonomy_object) { | |
| // Only watch 'category' and 'post_tag' taxonomies | |
| $allowed_taxonomies = ['category', 'post_tag']; | |
| return in_array($taxonomy_name, $allowed_taxonomies); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment