remove_rewrite_tag

Removes an existing rewrite tag (like %postname%).

Description

remove_rewrite_tag( (string) $tag ); 

Parameters (1)

0. $tag (string)
Name of the rewrite tag.

Usage

  1. if ( !function_exists( 'remove_rewrite_tag' ) ) { 
  2. require_once ABSPATH . WPINC . '/rewrite.php'; 
  3.  
  4. // Name of the rewrite tag. 
  5. $tag = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = remove_rewrite_tag($tag); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/rewrite.php  
  1. function remove_rewrite_tag( $tag ) { 
  2. global $wp_rewrite; 
  3. $wp_rewrite->remove_rewrite_tag( $tag );