Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • To make a custom page template. First 2 things you need to remember.

    1. You can save your custom page template only in theme directory by any name.
    Example: wp-content/themes/[your-theme-name]/custompage01.php
    2. You must add the custom page template name before start any coding in page.
    Example: <?php /* Template Name: Your-Page-Name */ ?>

    Now check your suggested link page template code:

    <?php /* Template Name: CustomPageT1 */ ?>
    <?php get_header(); ?>
    <div id=”primary” class=”content-area”>
    <main id=”main” class=”site-main” role=”main”>
    <?php
    // Start the loop.
    while ( have_posts() ) : the_post();
    // Include the page content template.
    Here is Your Code
    // If comments are open or we have at least one comment, load up the comment template.
    if ( comments_open() || get_comments_number() ) {
    comments_template();
    }
    // End of the loop.
    endwhile;
    ?>
    </main><!– .site-main –>
    <?php get_sidebar( ‘content-bottom’ ); ?>
    </div><!– .content-area –>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    This is a Server Issue. Maybe it is due to folder permission or php execution time error. Please check the server logs for better understanding.

Viewing 2 replies - 1 through 2 (of 2 total)