Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You cannot use .htaccess to add a category element to the request. It has no way of knowing what the right category is. The issue is when someone requests /producto/producto_name/, WP will treat it like a category request and fail to find anything. You need to intercept such requests through the “request” filter. Verify the request via query that it’s indeed a product and not an actual category. If so, get the correct category term and construct a proper URL for the product. Then call wp_redirect() using the proper URL.

    If the request is indeed for a category, return the passed query var array unchanged.

    Thread Starter mrvs2021

    (@mrvs2021)

    Thanks a lot . I understand now . I’m going to do it with a snippet

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

The topic ‘redirect with variable %title%’ is closed to new replies.