I was wondering to do separate blog pages for separate category posts. What I was able to find was running query by category number, but this is not dynamic enough for me as I would like to run query on page title which is = category name.
Basically on page "events" I would like to display blog posts that are under category named "events"(category name == page title), and so on.
Any insights on how to achieve this would be great. What I tried to do and failed, was:
<?php query_posts('category_name='.get_the_title()); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div>
<h1><?php the_title(); ?></h1>
<p><?php the_content(); ?></p>
</div>
<?php endwhile; else: ?>no match<?php endif; ?>
Thanks in forward for any insights, links or notices.