Nothing is showing after posts
-
Hi there – I’m really new to coding for WordPress and I’m a bit stuck. I’ve created a custom template page for one of my pages; the header appears and the posts display as I want them to, but then there is nothing else. I can write whatever I want below and it won’t show – I also have the get sidebar and footer at the bottom and again neither of them are showing up. Can anyone see anything obvious that might be causing the problem? The header, sidebar and footer show up on all other pages. Below is the code I’ve used:
<?php
/**
* Template Name: Website Custom Page
*/get_header(); ?>
<div id=”primary” class=”content-area”>
<main id=”main” class=”site-main”>
<div id=”main-banner”>
/images/banner.jpg” alt=”jamesdpdrury Examples of Work”>
<div class=”main-banner-text”><?php wp_title(”, true,”); ?></div>
</div>
<div class=”wrapper”>
<div class=”other-websites”>
<p class=”section-title”>Latest Designs</p>
<?php
$paged = (get_query_var( ‘paged’ )) ? get_query_var( ‘paged’ ) : 1;
$args = array(
‘post_type’ => ‘post’,
‘post_status’ => ‘publish’,
‘category_name’ => ‘websites’,
‘posts_per_page’ => 4,
‘paged’ => $paged,
);
$arr_posts = new WP_Query( $args );if ( $arr_posts->have_posts() ) :
while ( $arr_posts->have_posts() ) :
$arr_posts->the_post();
?>
<div class=”post-block”>
<article>
ID, ‘link’, true); ?>”>
<ul class=”textWithBlurredBg”>
<?php
if ( has_post_thumbnail() ) :
the_post_thumbnail();
endif;
?>
<h2><?php the_title(); ?></h2>
</article>
</div>
<?php
endwhile;
wp_pagenavi(
array(
‘query’ => $arr_posts,
)
);
endif;
?>
</div>
</div>
</main><!– .site-main –>
</div><!– .content-area –><?php
get_sidebar();
get_footer();
- The topic ‘Nothing is showing after posts’ is closed to new replies.