通过添加以下代码进行修复。
<?php
$paged = ( get_query_var( \'paged\' ) ) ? get_query_var( \'paged\' ) : 1;
$child_query = new WP_Query(array(\'post_type\' => \'blogpost\', \'orderby\' => \'date\', \'order\' => \'DESC\',\'paged\' => $paged));
while ( $child_query->have_posts() ) : $child_query->the_post(); ?>
<div class="single-post">
<div class="leftContent">
<?php
$image = get_the_post_thumbnail($post->ID,array(300,180));
if($image == \'\'){
$image = wp_get_attachment_image(11270,array(300,180));
}
?>
<a class="title" href="<?php the_permalink()?>"><?php echo $image; ?></a>
</div>
<div class="rightContent">
<a class="title" href="<?php the_permalink()?>"><?php the_title()?></a><br>
<div class="post-date"><?php the_time(\'F jS, Y\') ?> by <?php echo get_the_author() ?></div>
<div class="content">
<?php echo excerpt($post->ID,320); ?>
</div>
<a href="<?php the_permalink()?>" class="readMore" >Read More</a>
</div>
</div>
<?php
endwhile;
?>
<div class="pagination">
<?php
echo paginate_links( array(
\'base\' => str_replace( 999999999, \'%#%\', esc_url( get_pagenum_link( 999999999 ) ) ),
\'total\' => $child_query->max_num_pages,
\'current\' => max( 1, get_query_var( \'paged\' ) ),
\'format\' => \'?paged=%#%\',
\'show_all\' => false,
\'type\' => \'plain\',
\'end_size\' => 2,
\'mid_size\' => 1,
\'prev_next\' => true,
\'prev_text\' => sprintf( \'<i></i> %1$s\', __( \'Newer Posts\', \'text-domain\' ) ),
\'next_text\' => sprintf( \'%1$s <i></i>\', __( \'Older Posts\', \'text-domain\' ) ),
\'add_args\' => false,
\'add_fragment\' => \'\',
) );
?>
</div>
<?php wp_reset_postdata(); ?>
</div>