WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
[resolved] Url parameters for static front page (4 posts)

  1. uudens
    Member
    Posted 1 year ago #

    Hello,

    I am using a static page as front page. This page's slug is home so when I open myproject.com it redirects to myproject.com/home/.
    Everything works great so far, however I need to pass URL parameters to this page.
    When I try to open, for instance, myproject.com/home/?foo=bar it redirects me to myproject.com/home/ and I can't acces the URL parameters.
    Could anyone suggest a fix or a workaround?

    Thanks!

    http://wordpress.org/extend/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    This is a bug. Try this:
    Edit the line 533 in polylang/include/core.php and replace:

    return $requested_url == home_url('/') || $requested_url == $this->page_link('', get_option('page_on_front')) ? false : $redirect_url;

    by:

    return $requested_url == home_url('/') || strpos($requested_url, $this->page_link('', get_option('page_on_front'))) !== false ? false : $redirect_url;
  3. uudens
    Member
    Posted 1 year ago #

    Your fix works perfectly, thanks!
    It's great that You are providing good and fast support for this plugin. Good luck!

  4. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for your feedback. I introduced the fix in the development release and it will be included in v0.9.2

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic