Custom category URL not displaying posts

First check if custom post type + taxonomy archive displaying correct posts by visiting a url structure like this – mysite.com/?post_type=products&products-category=monitors If it’s working then you can do some custom rewrite rules to show them just like you want. Here are some recommended answers on WPSE describing same Mixing custom post type and taxonomy rewrite … Read more

using wp_redirect to redirect to a permalink

Because it is looking for the page 404, which is a child of the page /error. Try just doing this: function show_404($message=”page not found”){ wp_redirect(home_url() . ‘/error?m=’ . urlencode($message)); exit(); } But your doing it wrong. You should just use WordPress’s internal 404 page, it will save a lot more headaches that will arise in … Read more