posts_where and gallery problems.
-
I’m having this problems with the below code:
add_filter(‘posts_where’, ‘archive_where’ );
.
.
.
function archive_where( $where ) {
if (is_category()) {
$varWhere = $_SESSION[‘ArchiveYear’];
if ( intval($varWhere) <> 0 )
$where .= ” AND YEAR(post_date) = $varWhere”;
}
return $where;
}The filter works as I would like, but I found that when using the plugin, it breaks the gallery and some posts will not show the images in the gallery. I’m guessing that gallery is using the same query as defined above and can’t find the needed information due to the date. Anyone know an answer to this problem?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘posts_where and gallery problems.’ is closed to new replies.