Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.
 Fatal error: Call to undefined function add_filter() in /home/paperme/foo.com/wp-includes/functions.php on line 3647

I got this error when adding this snippet to the end of functions.php

I was told this snippet would successfully remove the admin bar.

/**
 * Added by Chris - 10/03/2012
 */


function hide_admin_bar_from_front_end(){
  if (is_blog_admin()) {
    return true;
  }
  return false;
}
add_filter( 'show_admin_bar', 'hide_admin_bar_from_front_end' );
share|improve this question

1 Answer

up vote 4 down vote accepted

Never touch anything in wp-includes. Use the functions.php in your theme or a custom plugin.

share|improve this answer
I changed it in the theme...it would make more sense to have a central location to do this...I guess this is why people make custom plugins...do you have a link to a plugin skeleton I can use for starters? – Hiro Protagonist Oct 4 '12 at 20:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.