Custom structure permalink preventing 404

So to confirm, on a fresh WordPress install with that setup /non-existing-url definitely returns 404, so it’s not specifically the custom permalink that’s the cause. It may be worth posting your .htaccess in case it’s been modified. However I’d suspect that one of the plugins you have is helpfully adding this feature, and I’d suggest … Read more

Remove custom taxonomy slug from URL

Why don’t you try to create a slug of your own. And then link it up to your desire things. Just use this function: function slugify($str){ $search = array(‘Ș’, ‘Ț’, ‘ş’, ‘ţ’, ‘Ş’, ‘Ţ’, ‘ș’, ‘ț’, ‘î’, ‘â’, ‘ă’, ‘Î’, ‘Â’, ‘Ă’, ‘ë’, ‘Ë’); $replace = array(‘s’, ‘t’, ‘s’, ‘t’, ‘s’, ‘t’, ‘s’, ‘t’, ‘i’, … Read more

Custom permalink structure for custom post types including multiple taxonomy

This code produces the right structure but the post can’t be found (404) That is because the custom rewrite tags (%filter_1% and %filter_2%) appeared as-is in the generated rewrite rules (in the database). So you need to register the tags so that they’re replaced with the proper RegEx (regular expression) pattern when WordPress (re-)generates the … Read more

Woocommerce posts and products links works only once and then get 404 error

I realized that some php code changes the content of .htaccess file. The php folder was in a directory named ‘securityl’. I’ve been removed that directory but whenever the website was refreshing the directory and also the php files inside it was recreating. In the end I discovered that some code in wp-include/load.php is creating … Read more

Category permalinks don’t work even after flushing

The default WP category is only set-up to show posts out of the box. You should be able to expand this by doing something like the below in your functions.php: // Order course archive and taxonomy views function adjust_main_query($query){ if ( ! is_admin() && is_category() && is_category() && $query->is_main_query() ) { $query->set( ‘post_type’, array( ‘post’, … Read more