安装后 Wordpress 自动激活自定义主题
Wordpress auto activate custom theme after installation
始终使用自定义 wordpress 主题。
是否有可能在安装 Wordpress 后自动激活我的自定义主题?
描述
Switches current theme to new template and stylesheet names. Accepts
one argument: $stylesheet of the theme. ($stylesheet is the name of
your folder slug. It's the same value that you'd use for a child
theme, something like twentythirteen
.) It also accepts an additional
function signature of two arguments: $template then $stylesheet. This
is for backwards compatibility.
用法
<?php switch_theme( $stylesheet ) ?>
向后兼容的可选用法:
<?php switch_theme( $template, $stylesheet ) ?>
这里是参考 link
始终使用自定义 wordpress 主题。 是否有可能在安装 Wordpress 后自动激活我的自定义主题?
描述
Switches current theme to new template and stylesheet names. Accepts one argument: $stylesheet of the theme. ($stylesheet is the name of your folder slug. It's the same value that you'd use for a child theme, something like
twentythirteen
.) It also accepts an additional function signature of two arguments: $template then $stylesheet. This is for backwards compatibility.
用法
<?php switch_theme( $stylesheet ) ?>
向后兼容的可选用法:
<?php switch_theme( $template, $stylesheet ) ?>
这里是参考 link