Display just photos within a given post.

Forums Forums Slimbox2 plugin Display just photos within a given post.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #887
    Anonymous
    Member

    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!

    #6485
    malcalevak
    Moderator

    I 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.

    #6486
    Anonymous
    Member

    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.

    #6487
    malcalevak
    Moderator

    I’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.

    #6488
    Anonymous
    Member

    I’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.

    &quot;Scotty&quot; 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.

    #6489
    Li-An
    Member

    I’ve just take a look at the plugin and have the same problem.

    #6490
    malcalevak
    Moderator

    Have you tried tweaking it as address in this post: https://geek.hellyer.kiwi/forum/http://local … 60#msg6460

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.