Wordpress 如何使用多个buddypress移动主题
如何为buddypress mobile使用多个主题,我想在这些主题之间快速切换。这是为了创建样式和测试主题。也比较这些主题。创建一个文件Wordpress 如何使用多个buddypress移动主题,wordpress,mobile,wordpress-theming,buddypress,Wordpress,Mobile,Wordpress Theming,Buddypress,如何为buddypress mobile使用多个主题,我想在这些主题之间快速切换。这是为了创建样式和测试主题。也比较这些主题。创建一个文件/wp content/sunrise.php。在那里你可以这样写smth: add_filter('option_template', 'filter_get_option'); add_filter('option_stylesheet', 'filter_get_option'); function filter_get_option($value){
/wp content/sunrise.php
。在那里你可以这样写smth:
add_filter('option_template', 'filter_get_option');
add_filter('option_stylesheet', 'filter_get_option');
function filter_get_option($value){
// here you can based on url or any other thing
// change the theme on a fly, like this:
if(true){
$value = 'theme_1';
}else{
$value = 'theme_2';
}
return $value;
}
这有点像黑客,但它是有效的theme\u 1
和theme\u 1
是主题文件夹(位于/wp content/themes/