How to have numeric URLs in Posts and Pages

Hope the following code might help add_filter( ‘wp_unique_post_slug’, ‘mg_unique_post_slug’, 10, 6 ); /** * Allow numeric slug * * @param string $slug The slug returned by wp_unique_post_slug(). * @param int $post_ID The post ID that the slug belongs to. * @param string $post_status The status of post that the slug belongs to. * @param string … Read more

Adding a hook to ‘parse_request’ so that siteurl/pagename/xyz ignores “xyz”

I would just add a rewrite rule rather than try to modify query parsing. function wpd_series_query_var( $vars ){ $vars[] = ‘wpd_series’; return $vars; } add_filter( ‘query_vars’, ‘wpd_series_query_var’ ); function wpd_series_rewrite_rule() { add_rewrite_rule( ‘^series/([^/]+)/?$’, ‘index.php?pagename=series&wpd_series=$matches[1]’, ‘top’ ); } add_action( ‘init’, ‘wpd_series_rewrite_rule’ ); Don’t forget to flush_rewrite_rules() after adding new ones. You can then get wpd_series anywhere … Read more

List of default WordPress URLs

Currently I can’t offer a full answer to your question, but here as a starting point a (PHP 5.3+/closure) plugin that dumps the global WP_Rewrite object into the shutdown hook. <?php /* Plugin Name: Show WP_Rewrite Dump at the last hook (shutdown) */ add_action( ‘shutdown’, function() { var_dump( $GLOBALS[‘wp_rewrite’] ); } ); This doesn’t take … Read more

How to setup 301 redirects for multiple query string URLs?

From doing some research, I’d recommend trying out this plugin: Redirection. This plugin allows you to manage 301 redirections. I played around with the settings and they allows regular expressions which could do the following: http://some.site/hashtag?tag=some-tag/ to http://some.site/tags/some-tag/ They provide documentation on how to set it up which can be found here. This is what … Read more