• Resolved grant512

    (@grant512)


    Is there a way to display the name instead of variables in the URL? to make it look cleaner and easy to understand?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter grant512

    (@grant512)

    Is there a way to shorten? example domain.com/product-category/truck-parts/?wpf_filter_cat_0=2023&wpf_fbv=1&wpf_dpv=1&wpf_filter_pwb_list_1=272&product_tag_25=socks

    above example are three filters only but notice how it looks clutter

    Hii @grant512

    document.addEventListener('wpfAjaxSuccess', function () {
    const currentParams = new URLSearchParams(window.location.search);
    let newUrl = '/product-category/truck-parts/';

    // Example: Build readable slugs based on current parameters
    if (currentParams.has('wpf_filter_cat_0')) {
    newUrl += 'model-' + currentParams.get('wpf_filter_cat_0') + '/';
    }
    if (currentParams.has('wpf_filter_pwb_list_1')) {
    newUrl += 'brand-' + currentParams.get('wpf_filter_pwb_list_1') + '/';
    }

    // Update browser URL without reloading
    window.history.pushState({}, '', newUrl);
    });

    Please try this script is work or not.
    Thanks

    Plugin Support tahawbw

    (@tahawbw)

    Hi @grant512,

    Good morning, and thanks for reaching out. Sorry for the delayed response.

    Unfortunately, the URL cannot be changed. It needs to remain as it is in order for the plugin to function as expected, but you can replace the ID with the category slug.

    Please let me know if you need any further assistance.

    Best regards,

    Plugin Support tahawbw

    (@tahawbw)

    Hi @grant512,

    I hope you are doing well.

    As we haven’t heard back from you in a while, I will mark this topic as resolved for now.

    Please feel free to reach out again if you need any further assistance.

    Best regards,

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

You must be logged in to reply to this topic.