I am a new comer to wordpress and also have a question about web addresses and aged products.

Essentially I've two groups of posts: news-item and media-coverage.

when you attend the 'news item' or 'media coverage' portion of the blog - (myblog.com/news-item/) , a menu that contains every year a publish is made for the reason that category is produced within the left navigation. Things I want is perfect for a person to have the ability to click among individuals links and examine all posts of specific category and year.

for instance the url would result in


and after that next page would result in


then your template would look something similar to this:

   if (have_posts()) : while (have_posts()) : the_post(); ?>
      <div class="entry">
     <?php the_content(); ?>
     <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
  <?php endwhile; 
   endif; ?>

I can not for that existence of me learn how to make wordpress recoginze the 'year' area of the URL. I'm able to hardcode annually within the 'query_posts' function like


also it does precisely what I would like, I simply can't allow it to be pull the date from the url, and I'd rather not write a template for each year/category combination. How do i make wordpress filter links in the manner I want it to?

edit: I presently have permalinks set to /%postname%/ ,unsure in the event that helps.

Do this:

register_activation_hook( __FILE__, 'flush_rewrite_rules' );
register_deactivation_hook( __FILE__, 'flush_rewrite_rules' );

function so7422487_add_rewrite_rules( $wp_rewrite ) {
    $new_rules = array( 
        '(.+)/(.+)' => 'index.php?category_name='.$wp_rewrite->preg_index(1).'&year='.$wp_rewrite->preg_index(2) );

    $wp_rewrite->rules = $new_rules + $wp_rewrite->rules;

add_action('generate_rewrite_rules', 'so7422487_add_rewrite_rules');

I have saved it as being a wordpress plugin at Gist. You can download that file and upload it for your plug ins directory.

Please let me know the way it went.