Xtremer360 Posted November 4, 2010 Share Posted November 4, 2010 I'm not sure why but I copied the correct syntax from the wp codex page for it to display the date and title which it displays the titles for the categories however it only displays the date for the headlines category and don't know why. Any answers? <?php get_header(); ?> <div id="left"> <div id="col1"> <img id="lp" src="../images/lp.jpg" alt="Latest Promo"> <img class="newslogos" src="../images/headlines.jpg" alt="DW Headlines"> <div class="mininews"> <?php //The Query query_posts('category_name=headlines'); //The Loop while (have_posts()) : the_post(); ?> <h3 class="date"><?php the_date(); ?></h3> <h4 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4> <?php endwhile; //Reset Query wp_reset_query(); ?> </div> <!-- End of main news div (headlines) --> <img class="newslogos" src="../images/rumors.jpg" alt="DW Rumors"> <div class="mininews"> <?php //The Query query_posts('category_name=rumors'); //The Loop while (have_posts()) : the_post(); ?> <h3 class="date"><?php the_date(); ?></h3> <h4 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4> <?php endwhile; //Reset Query wp_reset_query(); ?> </div> <!-- End of main news div (rumors) --> <img class="newslogos" src="../images/columns.jpg" alt="DW Columns"> <div class="mininews"> <?php //The Query query_posts('category_name=columns'); //The Loop while (have_posts()) : the_post(); ?> <h3 class="date"><?php the_date(); ?></h3> <h4 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4> <?php endwhile; //Reset Query wp_reset_query(); ?> </div> <!-- End of main news div (columns) --> </div> <!-- End of col1 --> </div> <!-- End of left --> <div id="right"> </div> <?php get_footer(); ?> Link to comment https://forums.phpfreaks.com/topic/217780-only-showing-1-categorys-date/ Share on other sites More sharing options...
MasterACE14 Posted November 4, 2010 Share Posted November 4, 2010 would that be because you're only grabbing the headlines category in your query? query_posts('category_name=headlines'); Link to comment https://forums.phpfreaks.com/topic/217780-only-showing-1-categorys-date/#findComment-1130419 Share on other sites More sharing options...
Xtremer360 Posted November 4, 2010 Author Share Posted November 4, 2010 But it's showing the date. Link to comment https://forums.phpfreaks.com/topic/217780-only-showing-1-categorys-date/#findComment-1130420 Share on other sites More sharing options...
MasterACE14 Posted November 4, 2010 Share Posted November 4, 2010 it only displays the date for the headlines category and don't know why. so I'm guessing you need to specify the other categories in your query or just select all of them query_posts('*'); Link to comment https://forums.phpfreaks.com/topic/217780-only-showing-1-categorys-date/#findComment-1130423 Share on other sites More sharing options...
Xtremer360 Posted November 4, 2010 Author Share Posted November 4, 2010 I don't think you get it. I have 3 different categories. However for the posts its only showing the date for one of the categories. http://defiantwrestling.net/ Link to comment https://forums.phpfreaks.com/topic/217780-only-showing-1-categorys-date/#findComment-1130437 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.