Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- To make use of the plugin, you have to write a configuration plugins, because the routing rules cannot be wrote on theme `function.php`.
- Your plugin will be something like:
- <?php
- /**
- * Plugin Name: My Rules
- * Author: Me
- */
- add_action('plugins_loaded', 'register_my_rules');
- function register_my_rules() {
- if ( ! function_exists('register_clever_rule') ) return;
- // RULES
- register_clever_rule(/items/%s/%d')
- ->query( 'pagename=items&string=[0]&number=[1]' )
- ->vars( array('string','number') ); // make wordpress recognize this additional query variables
- }
- 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.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement