I have Googled for a while and I am not sure how is the best way to do this.
In wp-includes/general-template.php
I am looking at the function wp_get_archives()
which has this line of code in:
$where = apply_filters( 'getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r );
What I want to do is have:
$where = apply_filters( 'getarchives_where', "WHERE post_type = 'post' OR post_type = 'events' AND post_status = 'publish'", $r );
However I am not sure how to hook into this filter and override it in functions.php
Any advice appreciated.
Thanks,
Ian