-
-
Save MakarandMane/448d63f9da4cdfae5cda63f33c74002d to your computer and use it in GitHub Desktop.
<?php | |
//This is variable is also used in parent theme i.e. BeTheme | |
//Set it false to show other betheme options. | |
define( 'WHITE_LABEL', true ); | |
add_action( 'admin_menu','while_label_theme', 13 ); | |
function while_label_theme(){ | |
if( WHITE_LABEL ){ | |
define( 'ENVATO_HOSTED_KEY', true ); | |
global $mfn_dashboard; | |
remove_action( 'admin_notices', array( $mfn_dashboard, 'admin_notices' ), 1 ); | |
// Move theme options page under | |
global $MFN_Options; | |
remove_action( 'admin_print_styles-'.$MFN_Options->page, array( &$MFN_Options, '_enqueue' ) ); | |
remove_submenu_page( 'betheme', $MFN_Options->args['page_slug'] ); | |
remove_menu_page( 'betheme' ); | |
$MFN_Options->page = add_submenu_page( | |
'themes.php', | |
$MFN_Options->args['page_title'], | |
$MFN_Options->args['page_title'], | |
$MFN_Options->args['page_cap'], | |
$MFN_Options->args['page_slug'], | |
array( &$MFN_Options, '_options_page_html' ) | |
); | |
add_action( 'admin_print_styles-'.$MFN_Options->page, array( &$MFN_Options, '_enqueue' ) ); | |
} | |
} | |
?> |
hi @MakarandMane ... thanks .. I tried but no work ...
😩
hi @MakarandMane ... thanks .. I tried but no work ...
@mrmax70 Where you put this code?
Are you using child theme? Dont put this code inside Betheme
in function.php in theme folder ..
yes I'm using chid theme...
in function.php in theme folder ..
yes I'm using chid theme...
Which version of Betheme you are using?
@mrmax70 try to add this to functions.php
define( 'ENVATO_HOSTED_KEY', true );
@mrmax70 try to add this to functions.php
define( 'ENVATO_HOSTED_KEY', true );
Thank you man, that's really helped!
is it still working?
Your PHP code changes were not applied due to an error on line 3745 of file wp-content/themes/betheme/functions/theme-functions.php. Please fix and try saving again.
syntax error, unexpected token "<", expecting end of file
i get this error
is it still working?
Your PHP code changes were not applied due to an error on line 3745 of file wp-content/themes/betheme/functions/theme-functions.php. Please fix and try saving again.
syntax error, unexpected token "<", expecting end of file
i get this error
You have received syntax error.
If you are not developer, then you might have code from <?php
inside php.
So Just copy between <?php
and ?>
.
If still not works, try to copy it inside child theme
Yes @mrmax70
Option 1: You can copy n paste this code in your theme's function.php file
Option 2: Download this gist as separate file and include it in theme's function.php file