Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Adding Slimbox to wordpress custom theme

40 views
Skip to first unread message

Alexander Moses

unread,
Oct 16, 2015, 3:16:42 AM10/16/15
to Slimbox
Hey everyone

I am having some trouble implementing slimbox 2.0 on my custom theme site (wordpress).

I have linked the three required files in the header.php like so:
`<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/js/slimbox2.js"></script>
<link rel="stylesheet" href="/js/slimbox2.css" type="text/css" media="screen" />`

Next, i transfer these files to the appropriate places along with images, via filezilla,

Then i use the rel="lightbox" like this:
`<p>
        <a href="<?php the_field('p1logo'); ?>" rel="lightbox" title="Beautiful, isn't it?">Click here</a> if you love star trek.
    </p>`

However, the image constantly shows in it's own url, nothing lightboxy about at all.

Check it out (in our work section, look for click here sentence at the top)
www.entirecreative.com/stone

Thanks for any help/advice/suggestions


Marko B

unread,
Nov 12, 2015, 8:41:08 AM11/12/15
to Slimbox
Hi Alexander,

I had the same issue. I solve it by including the latest jquery library (with the version 1.9.1 it didn't work), so the code to put in your header.php would look like this:

<script type="text/javascript" src="js/slimbox2.js"></script>
<link rel="stylesheet" href="css/slimbox2.css" type="text/css" media="screen" />

p.s.
Check the link for slimbox css, I think it should be "... href="/css/slimbox2.css"..." (instead of "...href="/js/slimbox2.css"...").

Hope it will help
Reply all
Reply to author
Forward
0 new messages