Whena person browses to your website, WordPress selects which template to use for rendering that page. As we learned earlier in the Template Hierarchy, WordPress looks for template files in the following order:
Every page template that has a template name can be selected by a user when they create or edit a page. The list of available templates can be found at Pages > Add New > Attributes > Template. Therefore, a WordPress user can choose any page template with a template name, which might not be your intention.
Conversely, many themes include the ability to choose how many columns a page will have. Each of these options is a page template that is available globally. To give your WordPress users this global option, you will need to create page templates for each option and give each a template name.
A quick, safe method for creating a new page template is to make a copy of page.php and give the new file a distinct filename. That way, you start off with the HTML structure of your other pages and you can edit the new file as needed.
Note that theme_page_templates is actually a dynamic theme_$post_type_templates filter. The dynamic portion of the hook name, $post_type, refers to the post type supported by the templates. E.g. you can hook into theme_product_templates to filter the list of templates for the product post type.
I have an existing collection with a linked CMS template page. I want to create a new collection based on this and slightly tweak it. I have create the collection no problem and now ideally want to copy/duplicate the existing template. I understand this is no possible and I have to basically rebuild the template from scratch. Can anyone suggest confirm this and also suggest a workaround ??
many thanks
There are a lot of pain points in Webflow that burn with a red flame, but they have been ignored for several years. These shortcomings do not look like minuses for which you can pay extra and solve on a more expensive plan, they are not fixed at all, in essence, it looks like a bug called a feature.
The problem is that if I choose this templates (that has a really different structure from the starting one), the result is the same structure of the old page with some small style of the new one.
This is not really what I need because I'm choosing the new template because of the different structure.
I guess that in order to have the new template look like the new one, you will have to use the modules belonging to the new theme. Using drag and drop, have you tried inserting the new modules you are interested in and dragging the CTAs you already have into them? This would seem to me to be the most convenient way to solve the problem you are experiencing.
we are using XWIKI (10.1) in my organization and installed on Linux server(Ubuntu) and created few pages.
As we need specific page format we used Encyclopedia Template and customizing per our requirement. instead of doing all these for each page, can I create page template out of one of my page, So that everyone can use this new template for building their pages.
I also cannot figure out how to eliminate the white space on top of and below my header. Is there a way to edit the Home template to eliminate this unwanted space. The header itself is set to have 0 padding and 0 margin.
Is it possible to transfer the static page I designed from the Home template to a new homepage? There seems to be something contradictory about the fact that I was able to edit the Home template to be a static page but both places where I can set the Homepage to be static it still shows it as last blog. I know at some point earlier in the process I set it to be static, but that may have been before I switched to the Twenty Twenty Three theme.
It seems to me that the distinction between layout and content becomes a bit foggy if my layout includes a header and two columns, one of which is a sidebar with a list of links and the other is a paragraph of permanent text. Are you suggesting that my layout should just consist of empty blocks for the header and the sidebar as well as the paragraph? If the Front Page template is always and only for the homepage, it seems to me that editing the content is the same as editing the layout. Obviously WordPress does not agree with me. : )
I am working on a Wordpress-based project, and I just added a new template to the installation by uploading a template file. I was creating a new page that will use my new template, when suddenly, the "Template" dropdown in the "Page Attributes" box is gone.
Update: I saw a site which told me to revert to the default template, and back to my custom template. Apparently it worked, but I am still baffled on what triggers this bug. Also, any additional knowledge or pointers on this bug would be a great help since my job requires me to patch this (and possibly submit the bug fix to Wordpress). Thanks!
So there must be the style.css on template directory then the templates directory will be shown. When you try to remove the style.css from the template directory or using style.css from css folder, then you must be put one style.css on template directory.
I have found a different solution for this. I reactivated my custom theme but then problem persisted.. then in the top most section of the code for the custom page template where it actually defines the name of the template like this:
Just create an empty one, in case your hierarchy does not need one. But the existance of that file enables the option to choose the page template and suppresses an error message in the Choose-Theme page btw
In WordPress 5.8 they have moved the selectable custom templates out from under the Page Attributes section so no matter what you do you won't find it there (even if you spend 2hrs troubleshooting like I did, lol).
Custom selectable templates have now been moved into their own box call "Template". For me, it was at the top of my right-hand sidebar in the WP admin page editor. It's possible it may not show if it has been unchecked in your screen options settings which are now found under the three dots in top-right --> Preferences --> Panels --> Ensure "Templates" is checked.
I had the exact same problem with WordPress 3.2.1. I added a new template and the menu disappeared from the page add/edit screen. The solution was to switch back to the default twentyeleven theme end then right back to my custom theme. The templates drop-down began appearing again.
The Template Dropdown is now moved To Page Section and is located just between the Static and Visibility and Permalinks dropdown. But you will be able to see it if you are naming your custom file like
I had this problem a while back and found one janky solution after a lot of search--sometimes switching to another theme in your install and then switching back to you primary theme will make your templates appear. I know that sounds weird, but worked for me for a while.
To be sure that everything is settled fine. You may go to "Appearance > Themes". After the listing of themes, if there is nothing, than everything should be fine. Otherwise, it'll be written "Broken Themes" and you'll still have some issues to solve.
sass had deleted the content in my child style.css. The template drop down shows again once I added back the comments./*Theme Name: Sometheme ChildDescription: Child theme for Sometheme.Template: somethemeVersion: 1.1Text Domain: sometheme-child*/
There are a lot of great answers on this question, but one obvious solution, which initially escaped me, was to double-check that in Dashboard > Settings > Reading you want to set "Your homepage displays" to "Static Page" and then leave the "Posts Page" unselected.
While themes and a properly coded theme file play a role in the situation, the reason that the page attributes area on the edit page screen doesn't show the templates drop-down may be because you selected a particular page to be your "Posts Page", and so WordPress is not asking you for a custom template to use because it's already using front-page.php or home.php (See WordPress Template Visual Hierarchy).
I am working on a redesign, I've made new templates in the current live version of the site and I assign them during page creation - however when I view them on the live site they all appear to be using the default page theme.
My issue is that I can't find where to actually assign the new templates to the existing pages. I can not click into the page in the "pages" section and in the page builder I can switch to another theme via the top menu but not actually save it to the page I'm attempting to edit if that makes sense.
Hey @Ottodebac, I believe this is because you are working on a non-published theme in the theme customizer. Shopify currently limits that pages can only be assigned templates from the live theme, so it may be some wired interaction happening due to that.
Hi Brett, thank you for the response. The issue with that is that these pages are not from the live template but a redesign template. My workaround has been to create a new blank template on the live template site and then assign that template when creating a new page.
Sorry to show my issue more I've shared some screenshot. The template for the page is assigned in the "page" section but on the online store it still is reading the template default page. Is there somewhere else I need to change the setting?
Sorry to show my issue but I'm still having the same issue. I've shared some screenshot. The template for the page is assigned in the "page" section but on the online store it still is reading the template default page. Is there somewhere else I need to change the setting?
I have already a page on the same topic but want to move it onto a new template that my company has created. I just want to move my all information from the previous page to the new template and how is this possible?
3a8082e126