Adding Slimbox to wordpress custom theme

Skip to first unread message

Alexander Moses

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=""></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:
        <a href="<?php the_field('p1logo'); ?>" rel="lightbox" title="Beautiful, isn't it?">Click here</a> if you love star trek.

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)

Thanks for any help/advice/suggestions

Marko B

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" />

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
0 new messages