Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_hook('ClientAreaPage', 1, function($vars) {
- if($vars['filename'] === 'clientarea'){ // If you want it on the register page, use 'register' instead
- $currentTheme = $_SESSION['Template']; // Store the current theme
- $_SESSION['Template'] = 'twenty-one'; // Update theme to twenty-one for the specific page
- if($currentTheme !== 'twenty-one'){
- header('Location: '.$_SERVER['REQUEST_URI']); // Reload the page
- }
- }else{
- $currentTheme = $_SESSION['Template']; // Do the same stuff as above, just for every other page and set the theme back to the normal one
- $_SESSION['Template'] = 'six';
- if($currentTheme !== 'six'){
- header('Location: '.$_SERVER['REQUEST_URI']);
- }
- }
- });
- [Click and drag to move]
- ​
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement