I have a wordpress site and I want to change every themes via query string URL.
So I have 5 different themes and want to switch over them via passing the name of theme in URL.
e.g.: I have themes named like (red,green,blue,etc).
and currently red theme is activated in wordpress admin and also I don’t want to change theme from admin panel.
I just like to change theme via URL:
-
example.com?act_theme=red (Page should be display in blue theme)
-
example.com?act_theme=green (Page should be display in green theme)
-
example.com (Page should be display in red theme)
so here I am searching for is there any function or any plugin for it?
I googled this situation but doesn’t get exact need.
thanks
You want to use the PHP
GET
method in order to get the variable `act_theme” and set the stylesheet accordingly, so your function would look something like this: