03/10/2014 at 4:53 pm
#281856
Guest
Hi there! I had the same issue as Todd in that I am trying to get a custom template to register. I’ve been following along this thread but after I changed the line:
add_action( 'plugins_loaded', array( 'CN_Custom_Template', 'register' ), 11 );
I had the plugin/template register in WordPress, but I get the following PHP error on the front-end of the website for each instance of a contact card:
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'CN_Custom_Template::custom' was given in /hermes/bosweb/web173/b1870/nf.finningcompactedmont/public_html/finningcompactedmonton.com/wp-includes/plugin.php on line 429
I’m realizing that changing the following line:
$template->part( array( 'tag' => 'card', 'type' => 'action', 'callback' => array( $this, 'custom' ) ) );
Whatever name I enter in the place where ‘custom’ resides, that word is attached to the above error in place of ‘CN_Custom_Template::custom’
Annnnnd, I’m at a loss! Any help would be greatly appreciated!!
-
This reply was modified 12 years, 5 months ago by
Steven Zahm. Reason: Update code blocks for readability
