Front-end Editor: Loading only on certain pages

Here is a foolproof way to make only parts of your site editable:

function front_editor_disable() {
	if ( ! is_single() )
		return true;
}
add_filter('front_end_editor_disable', 'front_editor_disable');

Just add that code in your theme’s functions.php file and you’re good to go: the plugin will work only on single posts.

Feel free to replace is_single() with whatever condition you need.

comments powered by Disqus