Viewing 1 replies (of 1 total)
  • Using version 1.9.1 of the plugin, add this line to your theme’s functions.php file:

    smart_archives_load_default_generator();
    
    class SAR_Custom_Generator extends SAR_Generator {
    	// The list
    	protected function generate_list() {
    		$months_long = $this->get_months();
    
    		$list = '';
    		foreach ( $this->yearsWithPosts as $year ) {
    			for ( $i = 12; $i >= 1; $i-- ) {
    				if ( ! $current = @$this->monthsWithPosts[$year][$i] )
    					continue;
    
    				// Get post links for current month
    				$post_list = $this->generate_post_list($current['posts'], "\n\t\t");
    
    				// Set title format
    				if ( $this->args->anchors )
    					$el = "h2 id='{$year}{$i}'";
    				else
    					$el = "h2";
    
    				// Append to list
    				$list .= "\n\t" . html($el, $months_long[$i] . ' ' . $year);
    
    				$list .= html('ul', $post_list, "\n\t");
    			} // end month block
    		} // end year block
    
    		// Wrap it up
    		return html('div id="smart-archives-list"', $list, "\n");
    	}
    }

    The template tag should look like this:

    smart_archives('generator=SAR_Custom_Generator');

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Smart Archives Reloaded] How do I remove the link to the month?’ is closed to new replies.