How to create a page in theme with the given template?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
11 views
Create a theme on wordpress, but ran into the same problem, can't create a page with all the correct settings when you activate the theme, the page is created but I can't set the template when it is created... Can someone faced with such problem...
by | 11 views

2 Answers

0 like 0 dislike
Hello!
The idea is that if the template is named according to the principle page-slug.php the VP will automatically use this template for this page.
Another option is to attach the template to the page via functions.php
by
0 like 0 dislike
To connect a template file, you need to register at the beginning of
\r<?php <br/>/*
Template Name: template Name page
Template Post Type: post, page, event
*/
?>
The name of the file, like, not play a special role. The second line c Template Post Type allows you to specify the types of records to which to apply the template. If to leave only the Template name, the template will be applicable only for pages
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,187 answers
0 comments
40,796 users