How to create a custom layout in a child theme

Hi, I’m needing to create a custom layout in the Pro child theme. Basically, I need a container with no header and no footer with a comment section. How would I go about doing that? I’ve tried adding a new blank layout but it wont show up and I’m not sure what I’m doing wrong. Any help would be greatly appreciated!

Thanks!

Hi There,

Click Edit Page > Under the blue update button > Page Attributes > Page Template

For a container without header and footer, please Select Container No Header No Footer.

You also can choose Blank No Container No Header No Footer which is also great for landing pages.

Hope it helps

Yes, I know that. But those templates remove the comments section, I need a comments section. I tried copying and renaming ‘container no header no footer’ and renaming it in my FTP but it never shows up in the templates. I don’t know if I’m putting it in the right place. I’m hoping I can add some code in the copied template to add my comments section.

Hi,

You can COPY the file wp-content/themes/x/framework/views/{STACK FOLDER}
template-blank-7.php to your child theme in wp-content/themes/ x-child /framework/views/{STACK FOLDER}

Then try adding this code

<?php x_get_view( 'global', '_comments-template' ); ?>

Hope that helps

There is no {STACK FOLDER} in wp-content/themes/pro/framework/views. There’s bars, ethos, footer, global, header, icon, integrity, partials, renew and styles. I’m using integrity on my site so I assumed that was the one I needed to use. Also the views folder has nothing in it at wp-content/themes/pro-child/framework/views, do I need to add a folder there?

Hi There,

Yes, that is correct.

Thank you

Ok, that worked. I would like to create my own templates instead of just modifying the ones that are already there. I’ve tried renaming them but they don’t show up. How do you go about naming your own template?

Hi there,

Please refer to this guide here on how you can create your custom page template.

Hope this helps.

1 Like

Thank you so much @Jade!

You’re most welcome! :slight_smile: