@anjx
If I insert this:
https://www.site.com/index.php?page_id=13281
I’m redirect to:
https://www.site.com/immagini
Yes, I thought you’re trying to mask the query var and have it translate to a friendly URL?
If so, your next step would be to include the gallerytag
, read that on the immagini
page (in the immagini
template), and then retrieve the data matching the gallerytag
, which you can get the value from $wp_query
(which is a global).
Exist a way to mask a non friendly url also in html code?
An earlier question I asked was how you’re generating the URL in the HTML? Are you calling a function, and if so, what is the name of it?
@bcworkz
If so, rewrites are not the solution. You need a different way to pass the information contained in the query vars besides as URL parameters, such as user meta, transients, sessions, or cookies.
Based on the first post, the final solution also includes a gallery tag, which can only be supplied in the URL, so for that, I think he does need a rewrite if he wants to mask the URL.
@anjx
If I’m not addressing your issue at all, maybe try and explain your setup, e.g., whether you are working with custom post types, taxonomies, custom page templates, what are the query var components, how are they utilized, etc.
Once we have a better understanding of what you’ve built, maybe we can understand your goal and help you find a way to solve it.