Title: Exclude Query String For Google Font Api
Last modified: December 21, 2017

---

# Exclude Query String For Google Font Api

 *  [mariushosting](https://wordpress.org/support/users/marius84/)
 * (@marius84)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/exclude-query-string-for-google-font-api/)
 * Hello, i use this code in my functions.php
 *     ```
       function _remove_script_version( $src ){ 
       $parts = explode( '?', $src ); 	
       return $parts[0]; 
       } 
       add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); 
       add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
       ```
   
 * everythink works ok but this also remove my google font for being showed.
    how
   can i do for exclude just the google font query string?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Chetan Prajapati](https://wordpress.org/support/users/chetan200891/)
 * (@chetan200891)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/exclude-query-string-for-google-font-api/#post-9802622)
 * Hey,
 * How google fonts are loaded on your site?
 *  Thread Starter [mariushosting](https://wordpress.org/support/users/marius84/)
 * (@marius84)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/exclude-query-string-for-google-font-api/#post-9803228)
 * Hello great Chetan i use the T Poppins font [https://fonts.google.com/specimen/Poppins](https://fonts.google.com/specimen/Poppins)
 *  [h_rehman90](https://wordpress.org/support/users/h_rehman90/)
 * (@h_rehman90)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/exclude-query-string-for-google-font-api/#post-10197185)
 * Hello,
    I do it as follow:
 *     ```
       function _remove_script_version( $src ){
         if (strpos($src, 'googleapis') === false) {
            $parts = explode( '?', $src ); 	
            return $parts[0];
         } else {
            return $src;
         }
       } 
       add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); 
       add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Exclude Query String For Google Font Api’ is closed to new replies.

## Tags

 * [Query String](https://wordpress.org/support/topic-tag/query-string/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [h_rehman90](https://wordpress.org/support/users/h_rehman90/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/exclude-query-string-for-google-font-api/#post-10197185)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
