Creating Templates

  • Each time I create a new page template, with a new name, it overrides the previous one, so I only ever have one template, I need many. Like an index in a book, each chapter needs to be a template.

    WP.com: Yes
    Correct account: Yes

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    Can you tell me more about what you are trying to set up? When I checked, I saw that you had created a few templates: https://talland126891177.wordpress.com/wp-admin/site-editor.php?postType=wp_template.

    – Page: Empty Page
    – Grave Index East A
    – Grave Index – East – A

    These are not the names of templates included in your theme; you could create templates previously, but that has changed, and you cannot now? Can you walk me through what is happening by providing an example? It may help if I can retrace your steps in more detail.

    Like an index in a book, each chapter needs to be a template.

    I’m not sure I understood this. The way templates work on websites may be different than how it would work in other disciplines, but it is not typical to need to generate a new template per page. If you can tell me more about what you are creating, it’s possible we could show you a way to do that without the extra work of creating new theme templates.

    Thanks for the additional info!

  • Hi
    I want to create a basic default template to use on each new page. When I created the 2nd Grave Index as a new template it wiped out the 1st one, overriding the previous work.
    I have now just created two bank pages and can see these stay as individual templates, but it means creating new each time. Having created a blank page template, is there a way of saving it to use as a default for more new template pages.
    For example: From my heading Churchyard I link to East Graveyard on this page I list rows of names A-Z. Each row is linked to a page with a display of all A named gravestones, each one with a picture, name & number of grave, which will then link to a page with all the information for that gravestone.
    Thanks

  • Hi there,

    I want to create a basic default template to use on each new page…. I have now just created two bank pages and can see these stay as individual templates, but it means creating new each time. Having created a blank page template, is there a way of saving it to use as a default for more new template pages.

    By default WordPress is set up exactly in this way, there is a basic “page template” that all pages use that is blank for the most part: This is what it looks like on the demo site for the Russell theme you are using:

    Click to view image

    To explain what you are seeing, I’ve highlighted the blocks in the middle. As the template is set up by default, these are placeholders that will pull info automatically from your pages to “fill the layout” so this template really only include the basics like a header, footer, and some spacing, and a middle area that is a placeholder .

    That way, when you create a page for your site, it uses this empty template starting point, but fills out the middle area with the content you add in each individual page you edit in your page list here. Basically it’s the default container for each of your pages, but the idea is you would edit each page individually to have a unique layout rather than needing to create a new template every time.

    Understanding that, let’s take a look at your page template, which is modified from the example above: https://talland126891177.wordpress.com/wp-admin/site-editor.php?postType=wp_template&postId=pub%2Frussell%2F%2Fpage

    On that template, I see you have added a single image. When do this it becomes a part of the base template, so it will now appear on every page you create if you use the default template. That is why you see it on this page for example, because the image is in the template itself.

    If you wanted this image on every page by default then adding it in the template is the exact thing you would want to do. But if you just wanted this image to appear on a specific page, I would not add it to the template. Instead I’d add directly it to the pages I create, knowing that the default template will display that on one page only, but not every page on the site.

    For example: From my heading Churchyard I link to East Graveyard on this page I list rows of names A-Z. Each row is linked to a page with a display of all A named gravestones, each one with a picture, name & number of grave, which will then link to a page with all the information for that gravestone.

    I did notice you added a list block into your default page template I linked above.. I think it will help to explain that it would not become a starting point for creating unique lists (each page listing it’s own content) but instead a single list that woud be the same across all pages. Because the list a template that many pages share, there is not a way to edit it and have those edits show up in a specific page. Instead I would create a new page, and add the list to that specific page itself.

    I know this is a lot of info to take in, but I would recommend that you consider resetting your default page template, and then make each page unique (but using a default template) instead of creating a unique template for each page.

    If you would like to consider this, please let us know and we can direct you on how to reset your templates and adopt this method instead.

  • Thank you – I understand that adding anything to the page changes the template.

    You said – I would recommend that you consider resetting your default page template, and then make each page unique (but using a default template) instead of creating a unique template for each page.

    If you would like to consider this, please let us know and we can direct you on how to reset your templates and adopt this method instead.

    Yes please.

  • Perfect, you can see your template list here: https://talland126891177.wordpress.com/wp-admin/site-editor.php?postType=wp_template

    You will want to locate the default “Page” template in the list, and click on the “…” icon to reset it.

    Click to view image

    If you are open to it, I would actually recommend resetting all templates since I did not review them all but it seems possible you made changes there before I clarified how templates work.

    Also, if I can make another recommendation, we did a recent webinar on custom homepages that I think will be helpful for you to review. You are not building a homepage specifically, but it is a nice introduction to how the page editor works, and how you can design a single page layout in that view, no need for a custom page template. You can view a recent recording on our YouTube channel here: https://youtu.be/owHhtlkVvTg

    If you are interested in attending live you are welcome to sign up here, we will be releasing our November schedule soon: https://wordpress.com/webinars/

    Hope that helps. Please let us know if you have any more questions.

  • The topic ‘Creating Templates’ is closed to new replies.