Tag Info

Hot answers tagged

4

This rewrite rule should work (assuming "brand" and "type" are the taxonomy registered names): function custom_rewrite_rules() { add_rewrite_rule('^brand/(.*)/type/(.*)?', 'index.php?brand=$matches[1]&type=$matches[2]', 'top'); } add_action('init', 'custom_rewrite_rules'); Remember to flush the rewirte rules after saving this code in your site. ...


1

Unfortunately no. The filename is hard-coded into the core WordPress function with no way to override it by way of filters or other hooks.


1

Let me say beforehand that when using add_rewrite_rule() nothing is written to the htaccess file. Rewrite rules are stored in the database and handled by WordPress internally on PHP level. TL;DR: Rewrite rules do persist after plugin deletion, but probably not the way you'd expect it. When using add_rewrite_rule these rules are added in the options table ...


1

You cannot do this with redirect. Since, by definition, redirect sends browser off to a different location. You would need to map domain to an actual WordPress installation. It's not hard to have WP respond to different domain requests, however in your case it's complicated that you would need it to respond differently conditional on domain in request. I ...


1

When a URL is processed by Wordpress, its index.php script is loaded with the path to the requested page. Because in this case the index.php script is always found, a normal 404 error will never trigger (via ErrorDocument 404 …). If the requested URL does not match a page that WP knows about, WP will display its own "404" page. Unfortunately, if WP ...



Only top voted, non community-wiki answers of a minimum length are eligible