Sorry to revive a really old thread, but I am having the same problem. That last code you posted work. However instead of taking the post ID as a rel (rel="lightbox[86]"
) it prints out some large integer (rel="lightbox[134181907414754]"
).
I’ll have a look some more for a solution but if you know what’s up with that really large number and already have a solution, let me know ??
EDIT:
I should’ve really tried this fix before posting above, but the fix is to change some lines in wp-jquery-lightbox/wp-jquery-lightbox.php (Installed plugins -> jQuery Lightbox -> Edit -> first file on the list)
1. Search for function jqlb_do_regexp($content, $id)
2. Add global $post
after the first curly bracket (before $id = blah
)
3. Change $replacement = '$1 rel="lightbox['.$id.']">';
to $replacement = '$1 rel="lightbox['.$post->ID.']">';
Note that the above fix is not endorsed by the creator (yet) and usage testing is extremely limited to my case.