SHARE
TWEET

Untitled

a guest Nov 15th, 2013 40 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Download the plugin from github, https://github.com/Giuseppe-Mazzapica/CleverRules, after you have unzipped the file, you can rename the folder `CleverRules-master` to `CleverRules`. After that, put in plugins folder and activate.
  2.  
  3. To make use of the plugin, you have to write a configuration plugins, because the routing rules cannot be wrote on theme `function.php`.
  4.  
  5. Your plugin will be something like:
  6.  
  7. <?php
  8. /**
  9.  * Plugin Name: My Rules
  10.  * Author: Me
  11.  */
  12.  
  13. add_action('plugins_loaded', 'register_my_rules');
  14.  
  15. function register_my_rules() {
  16.  
  17.   if ( ! function_exists('register_clever_rule') ) return;
  18.  
  19.   // RULES
  20.  
  21.   register_clever_rule(/items/%s/%d')
  22.     ->query( 'pagename=items&string=[0]&number=[1]' )
  23.     ->vars( array('string','number') ); // make wordpress recognize this additional query variables
  24.  
  25. }
  26.  
  27. Save this plugins in plugins folder and activate it too. See plugin doc page http://rules.zoomlab.it/documentation/ for more info on plugin use.
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