Pass widget variable to external function

Firstly, you will need your code to store the exclude value somewhere. Since you don’t want to use a global ( rightly so ), you have few remaining options: a class the class you already have a closure standard APIs Option 1 a new object/class Here we create an object, that holds the category you’re … Read more

can’t edit widgets after moving from subfolder to root

If anyone will ever have these issues, here are some solutions: deactivate WP UI plugin – but if you still want to use it, try to modify wp_register_script( ‘wpui-script-before’, site_url( ‘?wpui-script=before’ ), ___something___ ); to wp_register_script( ‘wpui-script-before’, home_url( ‘?wpui-script=before’ ), _____something_____ ); in: /wp-content/plugins/wp-ui/wp-ui.php /wp-content/plugins/wp-ui/admin/wpUI-options.php /wp-content/plugins/wp-ui/inc/widgets.php