Forums › Forums › Slimbox2 plugin › Display just photos within a given post.
- This topic has 6 replies, 3 voices, and was last updated 14 years, 11 months ago by malcalevak.
-
AuthorPosts
-
June 21, 2009 at 1:40 pm #887AnonymousMember
Prior to the recent WP upgrade Slimbox2 would display only photos in the current post when viewing. This is exactly how I wanted it to work! Since the upgrade the loop now includes every photo on the page.
Any suggestions for getting Slimbox2 to only display the photos within a post?
Thanks in advance!
June 21, 2009 at 6:05 pm #6485malcalevakModeratorI take it you’re referring to the release of 2.8? Did you by any chance change your theme? My version is working fine, but it’s a different theme then the default, and perhaps the default was changed (if that’s what you use).
I’ll take a look at the code when I get a chance, in the mean time a quick fix is to manually add a div around the photos in a post and assigning it the class="post". This should fix your problem.
June 30, 2009 at 7:23 pm #6486AnonymousMemberI’ve just compared a couple of my themes. Using the default there is nolonger any <div class="post"> around the posts. Instead it looks like this… <div class="post-488 post hentry category-uncategorized" id="post-488"> Therefore it won’t be getting picked up. <div class="entry"> does appear now.
In this file "slimbox2_autoload.js.php" is this code…
return (this == el) || ($(this).parents("div.post, div#page")[0] && ($(this).parents("div.post, div#page")[0] == $(el).parents("div.post, div#page")[0]));
It looks to be related. Perhaps using div.entry may work although it would mess up lots of other themes.June 30, 2009 at 8:22 pm #6487malcalevakModeratorI’ve been quite busy lately, or I’d have gotten around to looking at the default theme myself. I think you must have some sort of typo in your explanation, when you say [quote:31d1szzo]<div class="[b:31d1szzo]post[/b:31d1szzo]"> around the posts. Instead it looks like this… <div class="post-488 [b:31d1szzo]post[/b:31d1szzo] hentry category-uncategorized" id="post-488">[/quote:31d1szzo] both of those entries contain the post class as indicated in bold (an element can have multiple classes).
Hopefully I’ll get a chance to look at this later in the week, I’ve been swamped lately with my paying job.
November 28, 2009 at 9:38 pm #6488AnonymousMemberI’m having the same issue here. I have not changed themes since upgrading to WP 2.8, when it broke! I tried editing the autoload.js.php file as per suggested below, but it didn’t change the behavior. Still shows all images on page rather than just in individual post. I’ve even tried manually coding div class="post" to every post, but that doesn’t work either.
"Scotty" wrote:I’ve just compared a couple of my themes. Using the default there is nolonger any <div class="post"> around the posts. Instead it looks like this… <div class="post-488 post hentry category-uncategorized" id="post-488"> Therefore it won’t be getting picked up. <div class="entry"> does appear now.In this file "slimbox2_autoload.js.php" is this code…
return (this == el) || ($(this).parents("div.post, div#page")[0] && ($(this).parents("div.post, div#page")[0] == $(el).parents("div.post, div#page")[0]));
It looks to be related. Perhaps using div.entry may work although it would mess up lots of other themes.December 29, 2009 at 2:37 pm #6489Li-AnMemberI’ve just take a look at the plugin and have the same problem.
December 30, 2009 at 1:23 am #6490malcalevakModeratorHave you tried tweaking it as address in this post: https://geek.hellyer.kiwi/forum/http://local … 60#msg6460
-
AuthorPosts
- You must be logged in to reply to this topic.