Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Forum: Plugins
    In reply to: [Pages Children] WPML fix
    Thread Starter museless

    (@museless)

    also this on line 284 method get_post_parent_query_string
    It will allow you to swich the language while a filter is applied, and still show the child posts of the translated post filter.

    if (isset($_GET['post_parent']))
    				$retv = intval($_GET['post_parent']);
    			else if (isset($_COOKIE['pages-children-'. $_GET['post_type'] .'-parent-id']))
    				$retv = intval($_COOKIE['pages-children-'. $_GET['post_type'] .'-parent-id']);
    			else
    				$retv = 0;
    
                if (function_exists('icl_object_id')) {
                    $xlat = icl_object_id($retv, $_GET['post_type'], isset($_GET['lang']) ? $_GET['lang'] : null);
                }
                return $xlat;
    Forum: Plugins
    In reply to: [Pages Children] WPML fix
    Thread Starter museless

    (@museless)

    ps, you will probably want to include other parameters, this is a harcoded way to add the lang parameter, other plugins may use other get variables you should take care of that in a better way.

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