wp_get_archives
-
So, I have a page called “Past Meetings” and there’s a php file for this page. This is how the site was setup when I began and I’m not too familiar with PHP.
Anyway, they say at one point, this drop down worked and you could select a month/year and it would filter in the meetings that matched. For example, october 2012.
It’s not working now. The code is below and it looks correct, but wanted to get opinions/insight from someone more knowledgable.
NOTE: ‘meetings’ is a custom post type via the Custom Content Type Manager plugin.
Thanks!
<div style=”width:250px;float:left;display:block;”>Sort by Month/Year:<select name=”archive-dropdown” onChange=’document.location.href=this.options[this.selectedIndex].value;’>
<option value=””><?php echo attribute_escape(__(‘Select Month/Year’)); ?></option>
<?php wp_get_archives(‘post_type=meetings&category_name=meetings&type=monthly&format=option&cat=-6,-7&show_post_count=6’); ?> </select></div>
The topic ‘wp_get_archives’ is closed to new replies.