permalinks always staying on home page
-
Hello,
I have a problem where my post permalinks are not working. Every path goes to the home page. I’m not seeing any errors in the console, it adds the path to the url, it just stays on the home page.. Also when I go to the post in my dashboard it says the url is /something but when I click from there it goes to the home page.
I have tried changing the settings to change the path of the blog posts but this does not change anything.
I have also tried a permalink manager plugin but this does not work either.
I’ve looked in the functions.php file and tried commenting out the redirect function and added the following code to try to overwrite, but to be honest I am not fluent in php and this is a chatgpt attempt:function fix_permalink_redirect($query_vars) {
if (isset($query_vars[‘p’]) && is_numeric($query_vars[‘p’])) {
global $wp_query;
$wp_query->is_home = false;
}
return $query_vars;
}
add_filter(‘request’, ‘fix_permalink_redirect’);
I don’t know what else to try. I would love to not have to change the theme because the client wants it specifically like this and I don’t want to have to custom make everything or find another theme they will like..
If anyone could help I would appreciate it a lot! Thankyou!The page I need help with: [log in to see the link]
The topic ‘permalinks always staying on home page’ is closed to new replies.
