0

I have downloaded fresh framework and installed on my local server. I copied options folder and nhp-options.php inside my theme directory. Then I called the class globally by

global $NHP_Options;

When I try to call copyright information in the footer

get("copyright_footer");

I get the following error

Fatal error: Call to a member function get() on a non-object in C:\xampp\htdocs\word\wp-content\themes\mCube\footer.php on line 19

Why is that, and how can I make it work?

0

You can try to call the class method like this:

global $NHP_Options;
$copyright = $NHP_Options->get("copyright_footer");

if $NHP_Options is an instance of the NHP_Options class.

  • It looks like class not called properly. – Prashant Apr 21 '13 at 9:11
  • @toscho, thanks for flattening the quotes, I guess they needed some hammering ;-) Prashant: do you get any more errors? What is the link to this external library? – birgire Apr 21 '13 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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