wordpress - Automatically select a template for a child page with the same name as another -
wordpress - Automatically select a template for a child page with the same name as another -
in wordpress website have page structure:
/posts /another-page/posts
basically 2 different pages listing different posts, though name (posts) same. 2 pages should utilize different templates. first "posts" page create file called page-posts.php, , it's automatically chosen. how can create same thing other "posts" page?
is solution create template , manually select dropdown in admin page? isn't there way alter slug withouth affecting url?
you can create 2 template files name page-{id}.php each page. handle both pages you.
template hierarchy page section
the ids each page unique. when select edit wp-admin area, @ url , can find id.
/wp-admin/post.php?post=6163&action=edit
for page, page id 6163. template name page-6163.php.
cheers
wordpress custom-wordpress-pages
Comments
Post a Comment