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 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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