Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Halo,

    Thanks for the correction. The less code we need in the functions.php, the better.

    It was probably my inexperience with WordPress.

    We love this chat client at our site. We’re still learning about it, but my admins and users like it.

    I may add some custom code to it at some point for features our crew would like added. The code is pretty straight forward and well organized (how I missed the simplicity of your correction above, I don’t know).

    Thanks again.

    You can remove the widget from the sidebar by putting the following code in your functions.php file in the directory of the theme you’re using:

    add_filter('widget_display_callback', function($instance, $widget, $args){
    	if ( 'quick-chat-widget' == $widget->id_base ) return false;
    	return $instance;
    }, 0, 3);

    If you’re using the twentyfourteen theme, you would probaby edit the file that is located here:

    wordpress/wp-content/themes/twentyfourteen/functions.php

    This code fragment registers a widget_display_callback, passing a function in-line. The 0 passed at the end of the add_filter call makes this method run early in the list of widget_display_callback hooks (i.e. it probably runs first). If the specified function attached to this hook (the “in-line” function) returns false, the widget is not rendered.

    If we did not check the widget, none of the plugins would be rendered (things like recent posts, and lists of posts in general for example).

Viewing 2 replies - 1 through 2 (of 2 total)