Created
July 18, 2013 14:18
-
-
Save CEscorcio/6029719 to your computer and use it in GitHub Desktop.
lists posts from a category that has the same name as the page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<h1><?php the_title(); ?></h1> | |
<?php the_content(); ?> | |
<?php endwhile; else: endif; ?> | |
<?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> | |
<p><?php the_content(); ?> | |
<?php endwhile; else: endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment