Skip to content

Instantly share code, notes, and snippets.

@jonyesno
Created January 20, 2012 04:55
Show Gist options
  • Save jonyesno/1645313 to your computer and use it in GitHub Desktop.
Save jonyesno/1645313 to your computer and use it in GitHub Desktop.
Script that sets WordPress's 'tag base' to 'filter' and nudges the rebuild stuff
<?php
if ( !defined('ABSPATH') ) {
require_once('./wp-load.php');
}
print "<pre>\n";
$wp_rewrite->set_category_base('');
$wp_rewrite->set_tag_base('filter');
$category_base = get_option('category_base');
$tag_base = get_option('tag_base');
print "[$url] category_base: $category_base\n";
print "[$url] tag_base: $tag_base\n";
create_initial_taxonomies();
$wp_rewrite->flush_rules();
print "[$url] done\n";
print "</pre>\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment