This topic has 12 replies, 4 voices, and was last updated 9 years by exenewyorker.
-
Author
Tagged: custom page template, template, custom, custom page
-
April 8, 2014 at 18:25 #14566PedromlParticipant
Hello.
Is there any way to create and use custom page templates?I created some of my own, but do not appear in the page editor as an option.
Thanks.
April 8, 2014 at 19:59 #14577sharmstrModeratorDid you put them in the right place? They show up for me by putting them in kleo-child/page-templates/
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 8, 2014 at 23:24 #14586PedromlParticipantThanks for the quick response.
If I need to modify a template to create a custom template which file should I use?
April 9, 2014 at 01:00 #14591sharmstrModeratorCopy the one that’s closest to what you want. They can be found in kelo/page-templates/. Keep in mind that you can only have one template for BuddyPress pages unless you hack the actual BuddyPress page. That’s a BuddyPress issue, not a Kleo issue.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 9, 2014 at 01:40 #14602PedromlParticipantMaybe I should be more specific.
I have 2 options to create a custom content page. This can be useful for other users.
1. I can create custom content shortcodes in the child theme functions.php file and add them from the wordpress editor.
2. Copy the file index.php from kleo in kleo-child/page-templates/ and modify it.
If the second point is possible, which part of the code index.php can be removed without damaging the theme?
Which of the two methods you recommend and consume fewer system resources?
April 9, 2014 at 02:23 #14613sharmstrModeratorI’d go with 1. Its a common way to do things.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 9, 2014 at 03:16 #14621sharmstrModeratorAnytime. The other benefit by doing it that way is that your page will automagically get any Kleo code updates instead of you having to apply them yourself.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 12, 2014 at 16:08 #14906AbeKeymasterHi, All templates you copy from the main theme must stay in the exact folder structure in the child theme. So if you copy index.php then you copy it to the root of the child theme also.
To create page templates, which in Kleo theme are stored in page-templates folder, you just copy to the child theme one existing page template like full-width.php and give it a different name. To appear in the dropdown for the Page template you must edit it and also change the Template name to a different one:
COPY CODE/** * Template Name: Full-width New Name * * Description: Template withour sidebar * * @package WordPress * @subpackage Kleo * @author SeventhQueen <themesupport@seventhqueen.com> * @since Kleo 1.0 */
You can go with the page templates if you want, but using shortcodes could be useful in the future to change some things from that page quickly in another one.
As for the system resources I don’t think it is such a big impact of performance but probably not using a shortcode and basically writing the code by hand in the template could be faster..Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.December 10, 2014 at 18:12 #38450exenewyorkerParticipantHow do I customize archive-portfolio.php to add a sidebar?
December 10, 2014 at 18:30 #38451sharmstrModeratorIf you dont want to edit .php files, then switch to Custom page for Portfolio Archive then set the page to use a sidebar.
If you want to edit it, try copying it to your child theme and change kleo_switch_layout( ‘no’ ) to either kleo_switch_layout( ‘left’ ) or kleo_switch_layout( ‘right’ )
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
December 10, 2014 at 20:12 #38469exenewyorkerParticipantPerfect – edited the archive-portfolio.php to kleo_switch_layout( ‘right’ ) and didn’t loose the categories filter menu.
Thanks!
-
AuthorPosts
The topic ‘Custom page templates’ is closed to new replies.