custom template
-
hello, i am using your plugin, i am trying add custom template but does not work, i get the next message ERROR: Template custom not found.
thanks in advance
-
@ vmp584
You’ll have to give me a lot more detail. This is not much to go on. For example, did you start from an existing template… start from scratch? Do you have you code on Github or something so it can be shared?
hi, i started from an existing template ‘profile’
@ vmp584
Without more details, the best I can do to help is refer you to this tutorial on how to tweak one of the core template such as Profile:
https://connections-pro.com/2014/05/13/quicktip-tweaking-core-templates/
I hope that helps!
hello, I’m guided by this link https://connections-pro.com/2014/06/04/quicktip-custom-template-override-files/ i create the folder and the card.php file but i get ERROR: Template custom not found, also tried https://connections-pro.com/2014/05/13/quicktip-tweaking-core-templates/ but i get the same result
@ vmp584
re: i create the folder and the card.php
Did you create a blank
card.phpfile or copy the existing one? If it is an existing one, what changes to the file did you make.Which folder, exactly, did you place it in?
What is the exact shortcode you are using?
What is the template activated on the Connections : Templates admin pages?
What is the link to the page showing the error?
List step and actions you have tried to resolve the error, please be specific.
Please, provide as much detail as possible or I will not be able to help because without details, I can only offer random guesses.
hello thanks for your quick response, i made several attempts.
- i copied the folder connections/templates/profile and connections/templates/members in the path ../wp-content/theme/{child-theme}/connections-templates/{slug} i change the folder’s name and the slug.
- the shortcode that i am using is [connections id=”1″ template=”custom”] also i tried with [connections id=”1″ template_name=”custom”]
- the shortcode is used by ajax call with
add_shortcode( ‘connections’, array( ‘cnShortcode’, ‘view’ ) );
echo do_shortcode( ‘[connections id=”‘.$ids.'” template=”custom” ]’ ); - I still have not changed the template because it does not work
@ vmp584
Ok, you do not actually have a “custom template” per say. You created template override files.
For a custom template you need to do more than simply change the folder name… so let’s back up a little.
Change the folder and file names to match exactly as they are in the
../connections/templates/folder.Now, the shortcode should be
[connections id="1" template="profile"]YUou should be able to make all the changes you want to the
card.phpfile and thecard-single.phpfile in the../wp-content/theme/{child-theme}/connections-templates/profile/folder.@ vmp584
Oh, the only files you need in the
../wp-content/theme/{child-theme}/connections-templates/profile/ folder.are thecard.phpand thecard-single.phpfiles. Delete any others.The files in the
../connections/templates/profile/folder must remain, do not move, change or rename these files.EXCELLENT it works. thank you very much. there is documentation about it to create a custom template?
thanks again
The topic ‘custom template’ is closed to new replies.