Support » Plugin: Clean My Archives » Limit archive list to one category?

  • I’m not an expert, but I know enough to get where I need to be. In this case, I use WP as a CMS and blog at the same time. In my archive list, I’d like to display all the blog posts only, not the content posts we’ve written. In other words, I’d like to display an archive list of everything in my parent category=14.

    In the plugin file, I’ve managed to change the way the date is displayed (‘jS:’) and removed the number of comments after post title. But figuring out where in the code I can force this plug-in to only list archives from one category is a little above me. Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi rzul

    I did this in the plugin code (see my extra line ‘cat’ and the cat id…

    /* Set up some arguments to pass to WP_Query. */
    	$args = array(
    		'posts_per_page'      => $attr['limit'],
    		'year'                => $attr['year'],
    		'monthnum'            => $attr['month'],
    		'cat'		=>	'6',
    		'post_type'           => is_array( $attr['post_type'] ) ? $attr['post_type'] : explode( ',', $attr['post_type'] ),

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thank you! I will try this very soon and let you know what happens.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Limit archive list to one category?’ is closed to new replies.