This topic has 12 replies, 4 voices, and was last updated 9 years by exenewyorker.

  • Author
  • #14566
     Pedroml
    Participant

    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.

    #14577
     sharmstr
    Moderator

    Did 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #14586
     Pedroml
    Participant

    Thanks for the quick response.

    If I need to modify a template to create a custom template which file should I use?

    #14591
     sharmstr
    Moderator

    Copy 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #14602
     Pedroml
    Participant

    Maybe 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?

    #14613
     sharmstr
    Moderator

    I’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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #14619
     Pedroml
    Participant

    Ok. Thanks for the quick reply 🙂

    #14621
     sharmstr
    Moderator

    Anytime. 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #14625
     Pedroml
    Participant

    Thanks, I’ll do it that way

    #14906
     Abe
    Keymaster

    Hi, 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.

    #38450
     exenewyorker
    Participant

    How do I customize archive-portfolio.php to add a sidebar?

    #38451
     sharmstr
    Moderator

    If 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #38469
     exenewyorker
    Participant

    Perfect – edited the archive-portfolio.php to kleo_switch_layout( ‘right’ ) and didn’t loose the categories filter menu.

    Thanks!

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘Custom page templates’ is closed to new replies.

Log in with your credentials

Forgot your details?