Ryan Crist
asked 6 years ago

Hi, Im trying to duplicate the default page template on Simplex. I have no clue where that file resides. Can you please tell me where the default page template is, how to duplicate it and allow it to appear in the page template drop down?
 
Thanks!

1 Answers
DominicStaff
answered 6 years ago

To duplicate default template in the DW Simplex, you can create a file.php (E.g: custompage.php) then add the following code to the custompage.php file:

<?php
/**
 * Template Name: My Custom Page
 *
 * @package DW Simplex
 * @since DW Simplex 1.0.3
 */

get_header(); ?>
        
    <?php while ( have_posts() ) : the_post(); ?>

    <article id="page-<?php the_ID(); ?>" <?php post_class(); ?>>
        <header class="page-header">
            <h1 class="page-title"><?php the_title(); ?></h1>
        </header><!-- .entry-header -->
        <div class="container-fluid">
            <div class="entry-content">
                <?php the_content(); ?>
                <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'dw-simplex' ) . '</span>', 'after' => '</div>' ) ); ?>
            </div><!-- .entry-content -->
        </div>
    </article><!-- #page-<?php the_ID(); ?> -->

    <?php endwhile; ?>
        
<?php get_footer(); ?>

Regards,

Powered by DW Question & Answer Pro