Wordpress Add new Template
Add a new Wordpress templateAdding new template files to a WordPress childs themes
WordPress Kind topic can overwrite legacy template file, but it can also provide template file that does not appear in the legacy element. Though you may never need your children's topics for it, this choice can open up opportunities for your design. This technology is particularly useful for page originals, for example.
Twenty Eleven topic has a standard page template called page.php. The page template will remove the page bar and center the contents on the page. We deliberately designed the page to make it easier to read. On the other hand, some folks want a full-width lay-out that extends across the full width of the site's main web page, so they can add a full-width web page, add a web page or other contents that work well.
In order to add the full width layouts function to your sub design, just add a new page template and the required style to the style.css as well. One good way to make a new topic page template is to copy an old one and change it if necessary. If this is the case, a good way to begin is to copy the page.php of the Twenty Eleven topic to a new fullwidth-page.php filename.
The fullwidth-page.php looks like this after a few adjustments: A new full-width web page template design category allows you to design the page template without changing the look of other sites in the overall design. Changing the look that makes this work easier is fast and simple. Just add the following rows after the @import rules in the sub theme's styles.css file: margin: 0; width: 100%; #content.full-width.entry-header, #content.full-width.entry-content, #content.full-width.footer.entry-meta, margin: 0 auto; width: 95%; changing to the new full-width page template creates this page template.
Add a new page template to your child's topic
We assume in this paper that you are already comfortable with children's issues and that you have already gone through the entire procedure of creating your own child's issue. And one of the great things about creating a sub design is that you can build your own customized page styles that are resistant to higher-level topic updating.
I' ll show you the step by step procedure to creating a new page template in your sub-theme in this Tutorial. We' ll take a Performag page template named "Landing Page", rename it and make some changes. One way is to recreate a page template from the ground up, and the second way is to just copy and edit an exisiting page that exactly fits what you're trying to do.
Since we are going to change an already created template, the first thing to do is to find the template and copy it to the subordinate topic folders. Of course, the name of the template changes according to the template. I' ll just copy this filename directly from the top level Topic folders to the bottom level Topic folders.
You now have a copy of the page template from the higher-level topic in your children's topic. Since we do not want to override the topic's superordinate page template, we must give our new page template a clear filename and name. Now we have a complete new page template that can be changed.
Now you can change your new page template as you like. I will show you in this workshop how I would change the page template from links (the original) to right (the changed version): After is a minimum copy of the page template.
I' ll now make the changes to the template to delete the headers and footers. I' ll delete get_header() from the sub topics template filename; and substitute it with wp_head(); this will delete the headers template filename but keep the wp_head(); hook allowing plugs and topics to still mount and download necessary filenames.
I' ll do something similar with the bottom line and substitute the get_footer(); with wp_footer(); again this will delete the bottom line but keep the wp_footer(); check to make sure you can include plugs and themes if needed. Loading the template is as simple as going to your WordPress dashboard -> Pages and either add a new page or edit an old one.