Questions tagged [switch-theme]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Is the date when a theme was activated stored?

Is there a date for when the currently active theme was activated stored anywhere? If so, what's the best way to retrieve it? Thanks
0
votes
1answer
54 views

Can't switch to a child theme using filters template, option_template and option_stylesheet

In order to dynamically switch a theme in functions file (e.g. when wanting a different theme for a different domain, but same website), you use the following: add_filter('template', '...
0
votes
1answer
18 views

Ensure Quality Transition to New Wordpress Theme [closed]

I am using this theme on a blog right now https://www.mhthemes.com/themes/mh/magazine/ and I am trying to change to a more modern theme. What steps should I take to ensure a smooth transition? What ...
0
votes
2answers
29 views

Can I easily switch themes on a fully built website? [closed]

I have a WordPress website for a while now but I wanted to give it a more professional and clean look so I bought the porto theme to make that happen. The problem is that since the website was already ...
0
votes
1answer
3k views

Switching Theme and back will reset the previous Theme's settings?

Everyone, I have a Wordpress site on my hands, and I wanted to try a new Theme; I changed the active one and, unsatisfied, I selected again the previous one... and I found the website's appearance to ...
4
votes
2answers
1k views

Display a different theme for not logged-in users

Based on answers like this one, I made a small plugin to display a theme displaying a "Coming soon" theme, whilst our team of editors can fill in the final theme. It worked yesterday, but today, even ...
0
votes
0answers
161 views

Change the user role based on login or theme switch

I'm developing a CMS system based on a multisite installation. I need to be able to do the following: Whenever a user logs into his site, he will immediately be forced into "Contributor" role. I ...
0
votes
2answers
2k views

How to switch theme if the current user is admin?

I am trying to switch my current custom theme to twenty fifteen theme if the visitor is admin. So I put following code into my custom theme functions.php /*** Switching theme to Admin ***/ add_action(...
0
votes
1answer
464 views

How to allow users to switch to the child theme from front end without plugin?

I have two themes. mytheme mytheme-child By default my site loads with mytheme And I have a link by the header: <a href=" [here I have to give a code line that switches the default theme to ...
0
votes
0answers
142 views

Show child theme for users on specific IP

I have some users coming in from a fixed IP range on a very slow connection (256kbps) so want to server them a child theme that has a lot of the bandwidth intensive features removed. For ease of ...
1
vote
1answer
235 views

Switching content between summer and winter

I have been trying to come up with a good way to switch between summer and winter content. I am building a rental site and when the customer books they are automatically redirected to a second page ...
0
votes
1answer
181 views

Can't switch theme after activation

I'm creating a plugin (I'm very newbie in this) to load custom taxonomies, custom post types and an automatic activation of a theme, so I have this code: // Custom Post Types and Taxonomies ...
0
votes
2answers
215 views

Change site template from php

What is the argument to pass to switch theme, when I have the result of wp_get_themes()? $args = array( 'allowed' => true ); $themes = wp_get_themes( ); foreach ($themes as $theme) {...
0
votes
1answer
157 views

How to optimize on-the-fly theme switching for mobile browsers?

I'm using switch_theme() to switch between default and mobile themes for my visitors in real time. Here's my code : // Get the user agent $user_agent = $_SERVER['HTTP_USER_AGENT']; // Preg match for ...
0
votes
0answers
172 views

change theme when on mobile and also on Ipad portrait view

I am familiar with responsive websites and totally prefer it over working with different mobile versions, however, I have a case where there is a site that is alreay built and it is not responsive and ...
0
votes
1answer
46 views

Translate a site based on different themes

This is my first question on the site. First of all I want to apologize for my bad English. I´m migrating a site to a WordPress theme, and I need a solution to translate the theme to 3 different ...
0
votes
0answers
53 views

Deleting all Options on theme switch

I am looking to reset or delete all options on theme switch. Currently when I switch themes my options in my current custom theme that I am developing, will transfer to its associated child themes. ...
0
votes
1answer
372 views

Switch theme if ie compatibility/quirks mode?

How could you detect a browser is using ie quirks/compatibilty mode and then switch themes if detected? I've developed a nice new "responsive" theme for wordpress. It works great on mobiles & in ...
0
votes
1answer
198 views

Run two concurrent themes in one installation

I'm trying to add a 'blog' to my established and customized wordpress installation. Goal is to have a blog page that runs a child theme of TwentyTwenty, pulling any post of the category "blog-posts" ...
0
votes
1answer
105 views

How do I get from search_theme_directories() to the $stylesheet (name) for switch_theme()

I have a theme. It depends on a plugin. If you try to activate the theme and the plugin isn't installed, then I want to switch_theme() to some other (random**) theme in the search_theme_directories() ...
2
votes
1answer
131 views

How to load a different theme for categories?

I need to load a completely different theme for my categories. My search came up with switch_theme function but it changes the theme permanently while I only need the theme change only occur on my ...
1
vote
1answer
1k views

How to display message (with switch_theme hook) after deactivating My theme?

I'm able to display a message by activation of my theme with the 'new' after_switch_theme hook this way: function themeActivationFunction($oldname, $oldtheme=false) { $msg = ' <div class="...
2
votes
2answers
379 views

Styleswitcher or themeswitcher to allow user to switch back to standard view from mobile device

I created a mobile version of my site with CSS, with all my styles in a single stylesheet (using @media only screen and (max-width: 480px), only screen and (max-device-width: 480px) to define mobile ...
0
votes
1answer
237 views

WP 3.3 RC1 new switch_theme() method foobars sidebars

I've been testing the new 3.3 RC1 code against my plugin and I've found a significant difference in the switch_theme() function that foobars my ability to preset widgets dynamically. The problem ...