• Resolved artuvazro

    (@artuvazro)


    Hello!

    Perma-link settings: /%year%/%monthnum%/%postname%/
    Static front page: no
    Polylang-settings:
    http://i.imgur.com/LgHHTtw.png

    My front page is going to display always the posts of just one language, without taking into account the language the user has chosen, and I’ve already achieved that. The thing is, that the widget “Recent posts” does not display the default posts in other languages, despite the posts being shown in their front pages.

    I thought that it would be enough going to widget-recent-posts.php in polylang/include/ and replacing this:

    $lang = pll_current_language()

    with this:

    $lang = pll_default_language();

    However, nothing is changing and the result is the same… What am I missing?

    Thank you.

    https://wordpress.org/plugins/polylang/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    You should avoid hacking the plugin not to loose your customizations at upgrade (and rather use functions such as ‘remove_filter’, ‘remove_action’ in a custom plugin an then add your own filters and actions.

    I believe that the code you are looking for is in PLL_Frontend::parse_query() in frontend/frontend.php

    Thread Starter artuvazro

    (@artuvazro)

    Thank you very much! I’ve achieved just what I wanted.

    😉 Keep up the good work!

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

The topic ‘[Polylang] Always show recent posts widget from default language’ is closed to new replies.