Hi, thickbox with next and previous buttons now only work on posts, not pages. If I click on a thumbnail on a page, it only opens that picture and it is impossible to navigate.
Member
1 year ago
Join our team! We're hiring in beautiful Denver, CO. Love building things for the web? We want to hear from you!
Hi, thickbox with next and previous buttons now only work on posts, not pages. If I click on a thumbnail on a page, it only opens that picture and it is impossible to navigate.
I've worked it out. In functions.php replace:
$("a.thickbox").each(function() {
var url = $(this).attr("rel");
var post_id = $(this).parents("div.post").attr("id");
$(this).attr("href", url).attr("rel", post_id);
});
with:
$("a.thickbox").each(function() {
var url = $(this).attr("rel");
var post_id = $(this).parents("div.post").attr("id");
if (post_id){
$(this).attr("href", url).attr("rel", post_id);
} else {
var page_id = $(this).parents("div.page").attr("id");
$(this).attr("href", url).attr("rel", page_id);
}
});
Probably not the cleanest way to check for page/post, but it works for now.
Thanks. For the future, the best place to report bugs is in the Google Code site:
http://code.google.com/p/carrington/issues/detail?id=28
That way the development team is alerted to them.
These are community forums, provided so that users of these free tools can help each other and work together to get the most out of them.
Crowd Favorite makes free products available in the hopes they will be useful, but with no warranty and does not provide free support for them.