This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Tagged: 

Best practice for new page template

  • Creator
    Topic
  • #9388
    Andre Goersch
    Participant

    I have are couple of designs I created for a client that are a little complicated and specific, using custom posts and taxonomies, and non-standard loops, and after playing around with the layout builder I concluded that while it may be possible to bend it to my needs, it just might not be worth the trouble. Since what I need is a one-use template that is specific for this client, I think it’s just easier to create a new non-customizable page template.

    With that said, I still would like to make sure I’m working on the most efficient way since one of my objectives with this job is to learn the best ways to work with Jump Start. My question is, what is the recommended way to create a new page template with JumpStart? Should I just build one file directly, create a new pair of template+content files, or do something else entirely?

    Thanks for the attention.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #9391
    Jason Bobich
    Keymaster

    Hello Andre,

    There’s really no best practice here, I don’t think. I would say that just coding your own page template is probably going to be more efficient in terms of server resources when the page loads, just because you’re not doing the work of pulling the custom layout and looping through elements and what not. — But I guess that kind of depends on the specifics of each situation, and is probably here nor there. So, I’d just do whatever is easier for you to manage.

    If you’re wanting to go that route and just code everything in yourself — As a starting point, I’d just take one of the main template files like page.php, copy it to your Child theme, change the file name, and turn it into your page template.

    http://codex.wordpress.org/Page_Templates#Custom_Page_Template

    Just note that sometimes these main template files can change a little with updates. So, just next time you update the theme, just be on the lookout for any structural changes in the main template files like page.php, single.php, etc.

    And also, in your page template, note that that all the element functions used in the Builder can be found at /framework/frontend/functions/elements.php — So, you may want to utilize these, as well.

    Note: In the upcoming Jump Start 1.1 update, this will be at /framework/includes/elements.php.

    #9394
    Andre Goersch
    Participant

    Alright, that’s good to know. I’ll just stick with what I’ve been doing with my previous code base for those specific pages. Thanks for the advice on the element functions, those might help as well.

    And thanks for making Jump Start, it really is helping me bring my work to the next level. Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.