• Resolved TuneInTokyo

    (@tuneintokyo)


    1stly, this is a brilliant plugin!!
    I do have a small problem however:

    When i use wp_nav_menu(), the home link isnt being given the class ‘current_page_item’ on the home page of non-english pages. All other pages work properly (the correct link is highlighted for the current page), only the home page link doesnt get the correct class.

    I have noticed that after a query_posts() call, the wp_nav_menu() works as expected and the class is attached to the home link. So a sitemap at the bottom of the page works correctly and home link is highlighted, but a menu call above query_posts() (like in the header, where my main menu is) doesnt work properly.

    To get around this, i have to test if the current page is not an archive or a single page or using any of my templates or an error page.

    While this works, surely there is an easier way….?
    Is this a bug or something that is specific to my site, or something i am doing wrong?

    https://www.ads-software.com/extend/plugins/polylang/

Viewing 10 replies - 16 through 25 (of 25 total)
  • Plugin Author Chouby

    (@chouby)

    It’s not because I do not reproduce the bug that your problem does not come from polylang. I don’t like the way I was obliged to make things ‘work’. So problems may rise especially if another plugin or theme is playing with the same filter. I did not look yet, as it does not seem to be urgent since you found yourself a workaround. But trying to correct this is in my TODO list for v0.6.

    Thread Starter TuneInTokyo

    (@tuneintokyo)

    Thanks Chouby!!
    As you said, my fix is okay for the time being, i’ll test further when you release the next version.

    Plugin Author Chouby

    (@chouby)

    To be honest, I spent some hours on this issue, and did not succeed yet to find a valid solution. I did not reproduce the bug yet. Even on your site, it “randomly” works sometime (I looked at the classes displayed on the source code), which is very curious.

    Thread Starter TuneInTokyo

    (@tuneintokyo)

    That is very strange. Must be a conflict with another plugin or something.
    It doesnt even seem to work randomly for me.

    Thread Starter TuneInTokyo

    (@tuneintokyo)

    I just noticed another strange problem…my archive links have disappeared. Any call to wp_get_archives doesnt work and it seems like next_posts_link and previous_posts_link dont work either on those pages.
    It seems to have broken since the last polylang update i think.

    i disable all plugins…the archive and next/previous links are there.
    i leave everything disabled and reactivate polylang…the links are gone.

    could this be something i have done in my theme or settings, or could my install of polylang be broken somehow? or perhaps my wordpress install?

    everything else seems to be working perfectly though. very confusing.

    Thread Starter TuneInTokyo

    (@tuneintokyo)

    i have temporarily gone back to 0.51.
    archive links are now working again.

    must be something in the 0.6 version i guess?

    Plugin Author Chouby

    (@chouby)

    Yes. Bad regression already reported (seems to be the most annoying bug of 0.6). 0.6.1 will fix it soon.

    Plugin Author Chouby

    (@chouby)

    YES !!!!!! At last, I believe that I found the origin of the problem.

    Before, I did not notice that you highlight the ‘news’ menus on several different pages (news page + archive page). I noticed a different html code (I even wrote that “it works randomly”) but did not look carefully at the url I was browsing…

    Coming back on the issue, I noticed this time that the problem is on archives pages only and finally it took few minutes to find a correction.

    So I hope the 0.6.1 will correct the problem for you too.

    Thread Starter TuneInTokyo

    (@tuneintokyo)

    Brilliant!!!

    Ahhh, good work! I’m very excited for the next release!

    Thread Starter TuneInTokyo

    (@tuneintokyo)

    Works perfectly!!!

    Nice work Chouby!

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘[Plugin: Polylang] home link in menu is not highlighted on home of non-english pages’ is closed to new replies.