Title: [Plugin: Front-end Editor] Edit Select Widgets
Last modified: August 19, 2016

---

# [Plugin: Front-end Editor] Edit Select Widgets

 *  Resolved [Scotm](https://wordpress.org/support/users/scotm/)
 * (@scotm)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-front-end-editor-edit-select-widgets/)
 * This is quite possibly the best WordPress plugin I’ve ever come across (with 
   kudos to Widget Logic):)
 * I’ve seen examples where you can limit editing to select categories, etc. but
   is it possible to limit it to select widgets as well? Perhaps by widget title
   somehow?
 * Great work!

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

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-front-end-editor-edit-select-widgets/#post-1819576)
 * You can restrict widgets by widget type, widget number, sidebar id or any combination
   thereof:
 *     ```
       function restrict_widget_editing( $allow, $params ) {
       	extract( $params ); // populates $widget_id and $sidebar_id
   
       	$widget_type = explode( '-', $widget_id );
       	$widget_nr = array_pop( $widget_type );
       	$widget_type = implode( '-', $widget_type );
   
       	if ( 'categories' == $widget_type )
       		return false;
   
       	return $allow;
       }
       add_filter( 'front_end_editor_allow_widget', 'restrict_widget_editing', 10, 2 );
       ```
   
 *  Thread Starter [Scotm](https://wordpress.org/support/users/scotm/)
 * (@scotm)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-front-end-editor-edit-select-widgets/#post-1819642)
 * scribu
 * Awesome…but if I understand you widgets can’t be excluded by the title you give
   them? I’m looking for the ability to exclude editing on some instances of Text
   widgets versus all Text widgets (type), though failing that I guess I could limit
   it to the sidebar ID where they appear.
 * If I was using the above code, how would I exclude “footer-1” as an example of
   a widget area to exclude or “Text” as an example of excluding Text widgets or“
   Primary Sidebar” as an example of a sidebar to exclude.
 * This is a great feature btw…
 * Thx
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-front-end-editor-edit-select-widgets/#post-1819698)
 * > If I was using the above code, how would I exclude “footer-1” as an example
   > of a widget area to exclude or “Text” as an example of excluding Text widgets
   > or “Primary Sidebar” as an example of a sidebar to exclude.
 * I don’t understand what you mean by “widget area”.
 * I already explained the information you can use. Beyond that, it’s just basic
   PHP knowledge. One final example:
 * To disable editing of all text widgets in the ‘primary’ sidebar, in the first
   example, you would replace this:
 *     ```
       if ( 'categories' == $widget_type )
       	return false;
       ```
   
 * with this:
 *     ```
       if ( 'text' == $widget_type && 'primary' == $sidebar_id )
       	return false;
       ```
   

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

The topic ‘[Plugin: Front-end Editor] Edit Select Widgets’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/front-end-editor.svg)
 * [Front-end Editor](https://wordpress.org/plugins/front-end-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/front-end-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/front-end-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/front-end-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/front-end-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/front-end-editor/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [scribu](https://wordpress.org/support/users/scribu/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-front-end-editor-edit-select-widgets/#post-1819698)
 * Status: resolved