• Resolved ccggint

    (@ccggint)


    Alo,

    I have create a website and I used Polylang for multilingual content. Apart from this I installed Yoast for SEO.

    Later, I tried to build with Custom Permalinks plugin a more efficient structure for my permalinks but I’m facing issues such as redirection to other post or 404 page or additional /en/en/en/ in URL etc.

    Please check the screenshots below:

    URL in the post (Language code goes automatically to Custom Permalinks box)
    http://prntscr.com/c0zzwa

    URL in Yoast SEO box (gets the desirable permalink)
    http://prntscr.com/c1001y

    URL in the dashboard has 1 extra /en/ (View Post in the top bar)
    http://prntscr.com/c1008y

    URL in the menu has 2 extra /en/ (Post page added in menu for testing)
    http://prntscr.com/c100fk

    If I take the correct path from Yoast SEO box and paste it in browser, I can view my post page successfully for both languages. So, what happened and I get the extra /en/?

    Thanks for your time!

    https://ww.wp.xz.cn/plugins/custom-permalinks/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ccggint

    (@ccggint)

    Hi,

    I tried a custom patch by myself to function custom_permalinks_form in order to get language suffix in permalink before Custom Permalinks box, but by clicking View Post I fall on 404 page.

    $lang = pll_current_language();
    	if($lang=='en'){
    		$lang_suffix='en/';
    	}elseif($lang=='el'){
    		$lang_suffix='el/';
    	}else{
    		$lang_suffix=NULL;
    	}

    <?php echo home_url() ?>/<?php echo $lang_suffix; ?>

    Any ideas?

    Thanks

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi ccggint, I don’t know why you are getting this issue. I have just checked this issue but didn’t get the issue for my self.

    ccggint, Are you using WPML plugin as well. If yes, so please try to disable that and checked the issue..

    Please provide me your feedback on it.

    Thanks,
    Sami

    Thread Starter ccggint

    (@ccggint)

    Hi,

    No I don’t. I use only Polylang. It seems there is a conflict between the data that Custom Permalinks box saves (en/mycustom/permalink) and the entire permalink that WordPress keeps in database.

    To be more specific:

    WordPress recognize http://mydomain.com/alpha as the stable part of permalink in Edit area and language suffix goes automatically in Custom Permalinks box. But the default stable part of permalink for WordPress(View Post button) is http://mydomain.com/alpha/en which contains the language code. So, the final URL is (Default stable part of permalink) + (Custom Permalinks box) =
    (http://mydomain.com/alpha/en) + (en/mycustom/permalink)

    Thanks,
    Nick

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi Nick, Thanks for the reply and describe the complete situation.

    I am a bit busy in this week and didn’t get a time to check this issue. I’ll check the issue as sooner as possible for me and will get back to you.

    Thanks,
    Sami

    Hi Sami,

    I have the same issue with Polylang & Custom Permalinks. They don´t work well together..
    In addition, if Custom Permalinks & Polylang are both enabled, in my menu the current page link changes to http://www.example.com/en/%pagename%/, while all links to other pages are still working.

    Would be awesome if you could fix this..
    Thanks,
    Vincens

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi Nick( @ccggint) and Vincens( @bibradesign),

    I have fixed the conflict with PolyLang Plugin. Please check now and let me know if you get any issue in it.

    Regards,
    Sami

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

The topic ‘Custom Permalinks – Polylang – Yoast Compatibility’ is closed to new replies.