Created
          March 11, 2020 14:14 
        
      - 
      
 - 
        
Save slaffko1/1a24b256c7fecf930cfeb7d9cd4a6836 to your computer and use it in GitHub Desktop.  
    Remove "Category:" from title
  
        
  
    
      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
    
  
  
    
  | function prefix_category_title( $title ) { | |
| if ( is_category() ) { | |
| $title = single_cat_title( '', false ); | |
| } elseif(is_product_category()) { | |
| $term = get_queried_object(); | |
| $title = $term->name; | |
| } | |
| return $title; | |
| } | |
| add_filter( 'get_the_archive_title', 'prefix_category_title' ); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment