0

Question

What can i do in a child theme to create a page template that will be selected by a new page by default. I wrote the page "default with sidebar" but how do i actually implement it and get it working?

Background

I have a project that I am maintaining that uses Understrap. I created a template that has a left sidebar, but I need another page that displays a similar layout by default. Since it is not exact, I plan on using both "left sidebar page" and "default layout with sidebar".

I don't know where "default template" is, Ideally I could edit that.

enter image description here

Previous research

There is a similar question(Is there a way to change the default page template selection?)[Is there a way to change the default page template selection? but it was poorly phrased, they just asked if this was possible, which resulted in incomplete answers which did not discuss actual implementation.

1

The easiest way to achieve your desired result is to create a template file in your child theme and name it page.php. WordPress has a template hierarchy for template selection based on the queried object. See documentation.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.