Problem: posts made this year in blog won't show
-
I have installed a blog, it’s use is to replace the old news page on my already existing webpage. So I made a news.php, where the blog is read.
https://www.fortherestless.com/news.php
To make us of the loop and the query, I altered the index.php file in the theme folder that I am using, using this wordpress guide.
https://codex.www.ads-software.com/Template_Tags/query_posts#Example_2However, upon uploading the thing the blog doesn’t show anything, simply blank.
Can anyone show me where I went wrong ?<?php get_header(); ?> <div id="bd" class="yui-navset"> <div id="yui-main"> <div class="yui-b" > <div class="yui-g"> <?php // The Query $the_query = new WP_Query( $args ); $current_year = date('Y'); query_posts( "cat=22&year=$current_year&order=ASC" ); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <!-- item --> <div class="item entry" id="post-<?php the_ID(); ?>"> <div class="itemhead"> <h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3> <div class="chronodata"><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></div> </div> <div class="storycontent"> <?php the_content('Read more »'); ?> </div> </div> <!-- end item --> <?php comments_template(); // Get wp-comments.php template ?> <?php endwhile; ?> <?php endif; ?> <!-- end content --> <!-- 2nd sidebar --> <!-- end 2nd sidebar --> </div> </div> </div> <div class="yui-b" id="secondary"> <?php get_sidebar(); ?> </div> </div> <?php get_footer(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Problem: posts made this year in blog won't show’ is closed to new replies.