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

    (@mbis)

    Hi @manniweb,

    The plugin checks for all endpoints in $wp_rewrite->endpoints, therefore “filter” endpoint is most likely defined using the add_rewrite_endpoint() function by some third-party code or plugin.

    To make Permalink Manager ignores the “filter” endpoint, please use the below code snippet:

    function pm_force_404_filter_endpoint( $element_id, $uri_parts ) {
    if ( ! empty( $uri_parts['endpoint'] ) && $uri_parts['endpoint'] == 'filter' && ! empty( $uri_parts['endpoint_value'] ) ) {
    $element_id = '';
    }

    return $element_id;
    }
    add_filter( 'permalink_manager_detected_element_id', 'pm_force_404_filter_endpoint', 100, 2 );
    Thread Starter manni

    (@manniweb)

    Thank you @mbis . Its working fine

    • This reply was modified 5 days, 19 hours ago by manni.
    • This reply was modified 5 days, 19 hours ago by manni.
    • This reply was modified 5 days, 19 hours ago by manni.
    • This reply was modified 5 days, 19 hours ago by manni.
    • This reply was modified 5 days, 19 hours ago by manni.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.