Creating a page template within a theme
-
Hi, Help. I’m not a coder.
I am trying to create a template so I can create a page within my child theme (Standard Pro) so I can make the layout/elements different from the rest of the site.
I have copied the page.php from the original theme.
And created a new page.php, removing the header section of code and replacing it with a new line of code.
Having uploaded the page.php file the page on view shows all the content but the page layout as used for the rest of the site is not there.
Any help much appreciated as I’ve wandered out of my depth now.
This is the page.php file I am using:
<?php /* Template Name: CustomPageT1 */ ?> get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" > <?php while ( have_posts() ) : the_post(); get_template_part( 'template-parts/content', 'page' ); // If comments are open or we have at least one comment, load up the comment template. if ( comments_open() || get_comments_number() ) : comments_template(); endif; endwhile; // End of the loop. ?> </main><!-- #main --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>- This topic was modified 5 years, 11 months ago by . Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
The page I need help with: [log in to see the link]
The topic ‘Creating a page template within a theme’ is closed to new replies.