• 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]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hi there,

    Thanks for getting in touch. I’m sorry to hear about this error.

    Mission News doesn’t make any modifications to the permalinks. It uses core WP functions to get the URLs of each page, so there must be a conflict elsewhere on the site.

    First, I would recommend re-installing Mission News to get a fresh copy without any modifications. Next, try re-saving the settings in the Settings > Permalinks menu. That will rewrite the .htaccess and can fix odd issues like this. If this doesn’t work, try deactivating all plugins on the site and check if the pages then go to the right URLs. If they do, you can then reactivate the plugins one at a time until the issue returns. That will help you figure out which plugin is causing the issue, and you can either leave it deactivated or check for a problematic setting within the plugin.

    • This reply was modified 1 year, 2 months ago by Ben Sibley.
    Thread Starter charliezord

    (@charliezord)

    Hi,

    Thank you for getting back to me! Interesting that the theme does not change anything, because the links do work when i change the theme..

    I tried deactivating all the plugins but this makes no difference.

    I did also reset any changes I made to any theme files back to what it was, but i can try reinstalling the whole theme. Only I cannot seem to find how to do this. There is no delete button visible and I cannot seem to find online how to do it..

    Thank you very much!

    Theme Author Ben Sibley

    (@bensibley)

    If you activate another theme temporarily, you can click on the Mission News theme and the Delete button is at the bottom: https://d.pr/i/7W97j0. Very hard to find. Then you can install a fresh copy.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘permalinks always staying on home page’ is closed to new replies.