SHARE
TWEET

Untitled

a guest Nov 13th, 2012 37 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         add_filter('rewrite_rules_array', 'rewrite_rules_array_custom');
  2.         function rewrite_rules_array_custom($_rules){
  3.                 $rules = array();
  4.                 foreach($_rules as $key=>$rule){
  5.                         if (strpos($key, 'artists') !== false){
  6.                                 if (!isset($rulesSetted)){
  7.                                         $rulesSetted = true;
  8.                                         $rules['artists/([^/]+).html?$'] = 'index.php?post_type=artists&artists=$matches[2]&paged=1';
  9.                                 }
  10.                         } else {
  11.                                 $rules[$key] = $rule;
  12.                         }
  13.                
  14.                 }
  15.                 return $rules;
  16.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top