Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
12/04/2013 at 11:25 am #274761
No problem … Connections 0.8; I’ve modified the loading of templates just slightly. Now, the only thing that needs done is copy the core template from the templates to the plugins folder and activate. It will then override the core template so one can tweak away and it’ll be update safe.
This was part of the plan from the beginning when I redesigned the templating system back in March … and there’s is more to come to make this even easier and more flexible.
https://github.com/shazahm1/Connections/issues/21803/10/2014 at 4:53 pm #281856BreeGuest
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!!
03/11/2014 at 9:01 am #281910
- This reply was modified 8 years, 7 months ago by Steven Zahm. Reason: Update code blocks for readability
Assuming you modding the Default Card template … Change all 4 instances of
CN_Custom_Template(or other unique name). Then update the following as needed with your details:
$atts = array( 'class' => 'CN_Card_Template', 'name' => 'Default Entry Card', 'slug' => 'card', 'type' => 'all', 'version' => '2.0', 'author' => 'Steven A. Zahm', 'authorURL' => 'connections-pro.com', 'description' => 'This is the default template.', 'custom' => FALSE, 'path' => plugin_dir_path( __FILE__ ), 'url' => plugin_dir_url( __FILE__ ), 'thumbnail' => 'thumbnail.png', 'parts' => array(), );
I would not change this line at all … only the tweak the code within the function to meet your needs:
$template->part( array( 'tag' => 'card', 'type' => 'action', 'callback' => array( $this, 'card' ) ) );
Hope that helps.03/12/2014 at 12:36 pm #282008BreeGuest
Brilliant! Thank you, Steve, everything seems to be working perfectly now!03/12/2014 at 5:32 pm #282035
No problem! If you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance!
http://wordpress.org/support/view/plugin-reviews/connections07/27/2014 at 11:27 pm #298145Paul O’NeillGuest
Thanks Steve – took me a few attempts following the trail but I had the same problems which are now resolved.07/28/2014 at 9:02 am #298171
So you made your first custom template for Connections? Great to hear!
You cannot reply to this support topic. Please open your own support topic.