I have the idea of launching multiple WordPress themes per ounce. It might be nice to embed the wordpress plugin if possible. And yes, I could undertake such a task if it is not ridiculously difficult.
(Also, if you are interested in joining with me, let me know (leave a comment), I am decent in javascript and php, but not big, and would like to help!)
This is how I see it working: The current "set" theme is available here: "www.foo.com/" The second theme is available here: "www.foo.com/index.php?set_theme=theme2&" The third theme is available here: "www.foo.com/index.php?set_theme=THEME_NAME_HERE&", etc.
This can be used to bounce JavaScript. For example, if you go to www.foo.com/?page_id=9 and enable javascript, you will be redirected to javascript by "www.foo.com/index.php?set_theme=THEM_WITH_JAVASCRIPT&page_id=9".
Here is how I imagine how the plugin looks / works:
if(isset($_GET['set_theme'])){
$loadme = cleaned($_GET['set_theme']);
if($loadme exists){
loadtheme($loadme);
} else {
//go on as usual, as if this plugin doesnt exist
}
} else {
//go on as usual, as if this plugin doesnt exist
}
And of course, all links would have to be ad? set_theme = FOOBAR &
So my main questions are:
- How and where does Wordpress choose the current theme?
- How / where can you change this for internal links?
if (Iset ($ _ GET ['set_theme']))) {echo "? set_theme =". $ _GET ['set_theme']; } - Do you know of any good websites to point me in the right direction regarding how to create WP plugins?
source
share