Jump to content

Only showing 1 category's date


Xtremer360

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.