如何修复add_settings_field()调用未定义函数的错误?

I followed exactly this tutorial and I got this error:

Fatal error: Call to undefined function add_settings_field() in /home/content/41/11334041/html/test/wp-content/themes/mothereffintheme/functions.php on line 47

I'm new to working with the Wordpress API and I don't have any idea to how to fix it.

I saved it in my FTP program instead of the the theme editor. It worked!

Are you sure you loaded WordPress? add_settings_field() is a WordPress function rather than a default PHP function, if it's undefined it would indicate that the WordPress core hasn't been loaded. A bit of code might help. http://codex.wordpress.org/Function_Reference/add_settings_field