I need to add variables to all links in my site based on a condition.

So all permalink in a page that met my condition (in specific category or whatever) : www.domain.com/exemple-page or www.domain.com/category/cars would be www.domain.com/exemple-page?var=1 and www.domain.com/category/cars?var=1

How can i do that?

Read more here: Add variables to all permalinks in site


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: