NHP Options Framework – Fatal Error

NHP Options is a great plugin but it BREAKS YOUR WORDPRESS TONS if:

1) You try to activate the plugin without adding the activation code in your functions.php file:

 get_template_part('nhp', 'options'); 

2) If you try to use it with certain themes that call a similarly named function: of_admin_head

You see THEME CANNOT BE ACTIVATED FATAL ERROR    or     Cannot redeclare of_admin_head() (previously declared in 

To fix, go to your wordpress PLUGINS folder -> options-framework -> open options-framework.php -> search (cmd+F on mac or cntl+F on PC) for of_admin_head (i found it on line 316 and 319) and rename them both to anything else. I just used of_admin_head_1. Save and reupload file to your plugins, this will resolve the conflict.

note: you will have to remember to re-update this if you upgrade the theme.. so maybe highlight the text where you changed and take a screenshot to keep for memory!

3) You try and SWITCH WORDPRESS THEMES with NHP Options activated. IT WILL BREAK YOUR SITE.

First you have to deactivate the plugin, THEN switch themes, copy over: nhp-options.php + options folder, and reactivate. If you have accidentally broken your site before having a chance to deactivate, simply access your site via FTP -> navigate to plugins folder, rename options-framework to anything else temporarily (like options-framework1) and that will let you back into wordpress because you changed the folder name so it wont be able to access it.

Leave a Reply