tb_show is not defined in advance custom field

Did you also add wp_enqueue_script(‘media-upload’) in functions.php ? I tried this and it’s working: function load_admin_things() { wp_enqueue_script(‘media-upload’); wp_enqueue_script(‘thickbox’); wp_enqueue_style(‘thickbox’); } add_action( ‘admin_enqueue_scripts’, ‘load_admin_things’ );

Application passwords not working on localhost?

That error could happen if wp_is_application_passwords_available() returns a false, and the docs says: By default, Application Passwords is available to all sites using SSL or to local environments. Use ‘wp_is_application_passwords_available’ to adjust its availability. So, to enable the Application Passwords: Enable SSL on your localhost, Or define WP_ENVIRONMENT_TYPE either as a global system variable or … Read more

Allowed Memory Size Error in WordPress

The amount of memory that is allocated to PHP is insufficient. Add this to your wp-config.php file: define(‘WP_MEMORY_LIMIT’, ’64M’); If that doesn’t work, the chances are your host has this locked down and you can’t change it, in which case you either need to simplify your site, or move hosts.

How to use add_settings_error in register_setting callback

Take a look at the add_settings_error prototype. add_settings_error( $setting, $code, $message, $type ); The first argument is your settings name/key — or if your setting is on another page (eg general) it should be the page key. The second is whatever you’d like to add to the ID attribute, then error/updated message, and finally type. … Read more

add_sub_menu page() to be replaced by add_theme_page()

Themes are required to use add_theme_page() in the WordPress Theme Directory. You need: add_theme_page( $this->strings[‘page_title’], // Page title $this->strings[‘menu_title’], // Menu title ‘edit_theme_options’, // Capability $this->menu, // Menu slug array( &$this, ‘install_plugins_page’ ) // Callback ); s add_theme_page(theme_name.’ Settings’, theme_name ,’install_themes’, ‘panel’ , ‘panel_options’); $theme_page = add_theme_page(‘Settings’, theme_name.’ Settings’,’install_themes’, ‘panel’ , ‘panel_options’); add_theme_page(theme_name.’ Documentation’, ‘Documentation’,’install_themes’, … Read more

Dashboard Whitescreen of Death?

You have active a plugin or theme, that include scripts or styles via function wp_enqueue_style and wp_enqueue_script. Since version 3.3 is it not possible to enqueue script and styles without a hook. Find the source and fix this, is easy to do that. The codex have for this topic a fine documentation. /** * Proper … Read more