Tag Info

New answers tagged

1

For all those who might hit the same problem, here is the solution: Disable in Yoast the "remove category" option in advanced section. Then install this plugin: https://wordpress.org/plugins/remove-category-url/ ( do use any other plugin as this one works - yes, I tried them all) For some reason the Yoast solution and all other plugins don't allow ...


0

I would use the wp hook, which fires right after the request has been parsed and queried: function wpse_199869_wp( $wp ) { if ( ! is_admin() && is_404() && preg_match( '/^bh-job/', $wp->request ) ) { wp_redirect( home_url( user_trailingslashit( 'jobs' ) ) ); exit; } } add_action( 'wp', 'wpse_199869_wp' ); We ...


0

There is a dedicated method for it WP_Query->set_404(). From quick search through code it can be set in WP_Query->parse_query() or WP->handle_404() (note WP, not WP_Query!). But it can (and sometimes does) get set on query externally, for example by plugin that needs to invalidate specific resource.


0

Problem solved. I was advised to download a fresh copy of wordpress, delete all wp files/folders on my site EXCEPT wp-config.php file and the /wp-content/ folder, and then replace the deleted folders/files with fresh copies. This worked!


0

Please go Dashboard > Settings > Permalink and click Save button.


0

Possibly it's permissions. Go to the wp-content folder in the console and type: chmod -R 767 uploads Codex permissions info.


0

Create new file 404.php in your theme. This file will be shown everytime when wordpress doesn't find any page. And in that condition you can use wp_redirect function like this: wp_redirect( home_url( '404' ), 302 ); exit();



Top 50 recent answers are included