Hi there,
Yeah, this lightbox deal was bugging me. I need to place several inline html chunks in lightboxes on the same page. No documentation on this really. Thanks AJD for your stepping stone, however your solution is a little inefficient. This would mean you have to add CSS to your theme file for every new div you want to turn into a lightbox. That is messy and scary, if you were ever to mess up your CSS file.
I did some tinkering and came up with a way to only edit the CSS of the plugin once.
Here’s what you do:
1. Navigate to /wp-content/plugins/shortcodes-ultimate/assets/css/magnific-popup.css
2. Go to line 53, which should look like this:
.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
width: 100%;
cursor: auto; }
and change it to look like this:
.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
width: 50%;
background: #fff;
padding: 25px;
border-radius: 25px;
cursor: auto; }
3. That’s it, now a special note when you are creating the code for the post with inline. It will look like this:
[su_lightbox type="inline" src=".church"]here is the button[/su_lightbox]
<div class="church mfp-hide">
this is the inline content
blah
blah
</div>
Note:
-“church” is the made up identifier that the lightbox calls. With this method, you just make a unique identifier for each inline lightbox on the page.
-Each lightbox div will also use class “mfp-hide”
-mfp-hide is a class that I found already resident in magnific-popup.css
I played around and found that when you use it, it force-hides the div on the page, but allows it to change to “display: block;” when it opens the lightbox. I tested it and it is great now! I can put the six seperate page popups in!
YAY! Do this change and use the two classes, and it will work every time without further CSS creations…
Of course, buttons work best, instead of regular text, because then it is obvious you must press it.