custom posts permalinks url rewriting

The reason adding second permalinks like that makes the first type inaccessible is because WordPress is interpretting both list-firemen-games and list-mario as list-firemen-games post types. To WordPress, the regular expression that is registered looks exactly the same (both look something like ([^/]+)\.php/?), so when it pulls that regular expression, it’s going to match that pattern … Read more

Custom Path for a Plugin

Well this one is tricky. function my_plugin_query_vars($vars) { // add mypluginname to the valid list of variables $new_vars = array(‘mypluginname’); $vars = $new_vars + $vars; return $vars; } add_filter(‘query_vars’, ‘my_plugin_query_vars’); this will tell WordPress to accepts GET variables with the name mypluginname. so now you can process requests like http://www.example.com?mypluginname=param1 We add an action on … Read more