Is it possible to display the admin bar while in the Theme Customizer?

Is this what you are looking for? add_filter(‘show_admin_bar’, ‘__return_true’); Codex Btw following code in wp-config.php could help also: define( ‘WP_DEBUG’, true ); // Or false if ( WP_DEBUG ) { define( ‘WP_DEBUG_LOG’, true ); // writes errors down in wp-content/debug.log define( ‘WP_DEBUG_DISPLAY’, true ); // shows errors on screen output, set false to on write … Read more

add_theme_support(‘my-custom-feature’)

You have to register the sidebars in the parent theme just late later enough. Use a hook that runs later, and child themes can register their theme support. Child theme add_action( ‘after_setup_theme’, ‘register_header_sidebar_support’ ); function register_header_sidebar_support() { return add_theme_support( ‘header-sidebar’ ); } Parent theme add_action( ‘wp_loaded’, ‘register_theme_sidebars’ ); function register_theme_sidebars() { if ( current_theme_supports( ‘header-sidebar’ … Read more

How can I stop WP media uploader from creating duplicates of my uploaded images?

I believe the following should stop thumbnails from being created. If you’re wanting to remove some then and unset the $size[{size}]. Following sizes are there “thumbnail”,”medium”,”large”,”post-thumbnail”. add_filter(‘intermediate_image_sizes_advanced’,’stop_thumbs’); function stop_thumbs($sizes){ return array(); }

Context aware widgets. My work in progress

Just like you would from a widget() method: function wse_widget_display_callback($instance) { $show_it = true; if(isset($instance[‘noHome’]) && $instance[‘noHome’] && is_home()) $show_it = false; if(isset($instance[‘noPages’]) && $instance[‘noPages’] && is_page()) $show_it = false; … if($show_it) return $instance; else return false; } I’ve posted here the functions I use to accomplish this, it might be helpful. The form hooks … Read more

How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?

You don’t want to unregister the script; that would make it unavailable to be enqueued. Rather, you want to dequeue the script. You have two choices: If you know the callback function through which wp_enqueue_script( ‘jquery’ ) is called, you can simply call remove_action( ‘wp_footer’, ‘callback_function_name’ ) More likely, you won’t know the callback function … Read more

modify a output of a widget

I would copy the widget from the core as needed, put it in the theme or plugin, but you should also unregister the core widget you are replacing. That can be done like this: // unregister all default WP Widgets function unregister_default_wp_widgets() { unregister_widget(‘WP_Widget_Pages’); unregister_widget(‘WP_Widget_Calendar’); unregister_widget(‘WP_Widget_Archives’); unregister_widget(‘WP_Widget_Links’); unregister_widget(‘WP_Widget_Meta’); unregister_widget(‘WP_Widget_Search’); unregister_widget(‘WP_Widget_Text’); unregister_widget(‘WP_Widget_Categories’); unregister_widget(‘WP_Widget_Recent_Posts’); unregister_widget(‘WP_Widget_Recent_Comments’); unregister_widget(‘WP_Widget_RSS’); unregister_widget(‘WP_Widget_Tag_Cloud’); … Read more

Add link option to featured image?

you can do that in many ways , for example : add_filter( ‘admin_post_thumbnail_html’, ‘add_something_to_feature_thumb_box’); function add_something_to_feature_thumb_box( $myhtml ) { return $myhtml .= ‘<p>Put your HTML here – if you want a form, put the form.</p>’; } or (better IMHO) : function replace_post_thumbnail_box() { global $post; // get post echo ‘<p> if you want custom field … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)