
主题压缩包文件在 Theme Files 目录内。
下载文件包含child子主题,主题本体安装后启用子主题。
安装后按照设置向导安装所需插件和演示数据。
在flatsome-child子主题的functions.php文件中,新增下面的代码
$data = get_option(‘flatsome_registration’);
if(!$data[‘purchaseCode’]){
$site_url = get_site_url();
$domain_name = wp_parse_url($site_url, PHP_URL_HOST);
$update_option_data = array(
‘id’ => ‘new_id_123456’,
‘type’ => ‘PUBLIC’,
‘domain’ => $domain_name, // Set the domain to the current domain name
‘registeredAt’ => ‘2021-07-18T12:51:10.826Z’,
‘purchaseCode’ => ‘abcd1234-5678-90ef-ghij-klmnopqrstuv’,
‘licenseType’ => ‘Regular License’,
‘errors’ => array(),
‘show_notice’ => false
);
update_option(‘flatsome_registration’, $update_option_data, ‘yes’);;
};
如果使用上面代码,提示403API错误的红色提示,就在主题/inc/init.php文件中修改下面代码,没提示就不要修改。
if ( ! defined( ‘UXTHEMES_API_URL’ ) ) {
define( ‘UXTHEMES_API_URL’, ‘https://api.uxthemes.com’ );
}
改为
if ( ! defined( ‘UXTHEMES_API_URL’ ) ) {
define( ‘UXTHEMES_API_URL’, ‘你的网站域名地址’ );
}
主题压缩包文件在 Theme Files 目录内。
下载文件包含child子主题,主题本体安装后启用子主题。
安装后按照设置向导安装所需插件和演示数据。

