Jaysarie Gundran
asked 3 years ago

The website I’m working on is using the DW Page Modern theme version 1.0.6. It does not have a blog page template so I created a new php file (template-blog.php) to add a new template page to the theme as suggested by Nobita and in there put this code:`

`<?php
/**

  • Template Name: Blog
    */
    ?>
    <?php get_header(); ?>

<?php query_posts(‘post_type=post&post_status=publish&posts_per_page=4&paged=’. get_query_var(‘paged’)); ?>

<div id="main">
<div class="container">
<div class="section">
<?php while ( have_posts() ) : the_post(); ?>
<article <?php post_class(); ?>>
<header class="page-header">
<h1 class="page-title"><?php the_title(); ?>

<div class="entry-content">
<?php the_content(); ?>

<?php endwhile; ?>

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

I uploaded the new php file in the theme directory (/wp-content/themes/dw_page_modern_1.0.6_quickstart/wp-content/themes/dw-page-modern. 
However, when I go to the backend to create a new page, the template for the blog page does not appear.

Where did I get wrong?
1 Answers
DominicStaff
answered 3 years ago

Hi Jaysarie Gundran,
I’ve just sent you a PM, kindly check.

Powered by DW Question & Answer Pro