Viewing 7 replies - 16 through 22 (of 22 total)
  • I have the same problem. Links /%postname%/ WordPress returns a 404 error

    WordPress 3.5, Polylang 0.9.8, Nginx server.

    1 – save the settings again friendly links
    2 – I checked on the skin Twenty Ten
    3 – I turned off all the other plug-ins

    The problem still exists.

    (sorry for my poor English;)

    Best regards
    Lukasz

    Plugin Author Chouby

    (@chouby)

    which link is 404?

    I have the same problem.

    It only happened to the root menu, but for the drop down menu is fine.

    Home is fine, but the rest of the menu return 404.
    I tried to save a new .htaccess
    I tried to deactivate most of the plugins that I have installed before Polylang.

    Actually, polylang works fine before, probably due to certain plugin have a new update or maybe other issue.

    Thank you so much for helping.

    smile,

    Nabil

    (@nabil_kadimi)

    Resaving the permalinks solved the issue for me.

    Don’t forget to clear cache if you have any caching plugin installed.

    Dear Nabil,

    Thank you so much.
    I have figured it out the problem long time ago.

    In the Settings of Polylang, I chosed this

    Keep /language/ in pretty permalinks. Example: https://eiab.eu/language/en/

    with smile from Germany!

    Hello,

    I found the cause of the problem. The functions.php file had code that changed the links to the authors of /author/ to /autor/

    add_action('init', 'author_rewrite');
    function author_rewrite() {
    	global $wp_rewrite;
    	$wp_rewrite->author_base = "autor";
    	$wp_rewrite->flush_rules();
    }

    After removing this code, everything works fine ??

    Can we somehow accept this change links to sites with plug Polylang authors?

    Best regards!

    Plugin Author Chouby

    (@chouby)

    I can’t make anything with plugins and themes which use flush_rules in such a bad way. This function here is executed at every page load and one should *never* do this.
    https://codex.www.ads-software.com/Rewrite_API/flush_rules

    Just comment the line $wp_rewrite->flush_rules(); and you will be able to use the author base you want (go to settings->permalinks and click on ‘save changes’ to manually flush rules).

    If a plugin or a theme want to programmaticaly flus rules, it should make it at activation and deactivation.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘[Plugin: Polylang] 404 errors with /%postname%/ permalinks’ is closed to new replies.