Viewing 4 replies - 31 through 34 (of 34 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Ok, it means that the snippet needs one more adjustment – please use this version instead:

    function pm_ignore_filter_endpoint( $uri_parts, $request_url, $endpoints ) {
    if ( ! empty( $uri_parts['endpoint'] ) && $uri_parts['endpoint'] == 'filter' ) {
    $uri_parts['uri'] .= "/filter";
    $uri_parts['endpoint'] = "";
    }

    return $uri_parts;
    }
    add_filter( 'permalink_manager_detect_uri', 'pm_ignore_filter_endpoint', 100, 3 );
    Thread Starter ericafontimedia

    (@ericafontimedia)

    Now https://ronb33.sg-host.com/de/schweisrauchabsaugung/filter/sfc/ opens https://ronb33.sg-host.com/de/schweisrauchabsaugung/filter/

    And the same with all the other products.

    Plugin Author Maciej Bis

    (@mbis)

    I see – the best idea here would be instead to simply remove the /filter/ endpoint from the list of endpoints supported by Permalink Manager:

    function pm_exclude_filter_endpoint( $endpoints ) {
    return preg_replace('/(\||^)(filter)(\||$)/', '$3', $endpoints );
    }
    add_filter( 'permalink_manager_endpoints', 'pm_exclude_filter_endpoint', 100 );
    Thread Starter ericafontimedia

    (@ericafontimedia)

    It works!

    Thank you for your support!! 🙂

Viewing 4 replies - 31 through 34 (of 34 total)

The topic ‘A URL load a wrong page while in the backend the page is correct’ is closed to new replies.