php – Change Query from current url to a specific URL?


I’m trying to customize a plugin to search in our archive url only.

The current query is the following:

    global $wp;
    $current_url = home_url(add_query_arg(array(), $wp->request));

How do I change the query to be only on a specific url, for example:

siteurl + alle

which would result in

For reference we have a product page but also an overview category page that just displays images but has a sidebar filter. The Filter should therefore search in our archive page siteurl/alle instead of the current_url

Nicolas Körner 2 years 2021-04-23T16:06:58-05:00 0 Answers 0 views 0

Leave an answer