WordPress.org

Ready to get started?Download WordPress

Forums

jQuery Colorbox
Calling a WordPress Gallery in Colorbox from the menu (11 posts)

  1. harringtondavida@yahoo.com
    Member
    Posted 1 year ago #

    Hello,

    I am trying to figure out something that I know should work, but I can't seem to get it to happen. My church (www.victorybc.net) is currently using the Jquery Colorbox plugin for our photo tour. Right now, the tour is a page that has a gallery on it, which means we have to click a menu button that takes us to the page and then click one of the pictures that will start colorbox.

    What we would like to do instead is be able to click the menu button (from any page on the site) and have the colorbox launch automatically on top of whatever page the visitor is on. It would just start at the first photo and scroll through them as a slideshow. Is this possible? If so, please help! Thanks.

    By the way, we really like the plugin alot. It's lightweight, quick and responsive, even when I'm using MASSIVE photos. :)

    Sincerely,
    David

    http://wordpress.org/extend/plugins/jquery-colorbox/

  2. techotronic
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    opening links in the Colorbox is possible, so I guess it's just a question of adding a link to the menu that has the class "colorbox-link" and links to an image that is embedded into the page.

    Cheers,
    Arne

  3. harringtondavida@yahoo.com
    Member
    Posted 1 year ago #

    Hey Arne,

    I saw this idea on another forum post and tried it. I can get the menu link to call colorbox, but it won't open the images as a group/gallery/slideshow. It only opens the image that I link directly to. I also saw something about trying to use "colorbox-link-ID" where the ID is the group number, but can't get that to work either.

    Any thoughts? Thanks.

  4. techotronic
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    my plugin automatically groups images with the same colorbox-ID and links with the same colorbox-link-ID.
    If you'd like to start a slideshow from a link, you'd need to embed more links with the same colorbox-link-ID on the same page. It doesn't matter if they are actually displayed or not (e.g. CSS style visibility:hidden).
    Cheers,
    Arne

  5. harringtondavida@yahoo.com
    Member
    Posted 1 year ago #

    This is pretty much what I've been trying to do, but having no luck...

    On the menu, I linked to an image w/:
    URL=http://victorybc.net/wp-content/uploads/2012/12/3-front.jpg
    CSS Class=colorbox-link-1
    Link Relationship=colorbox-link

    In a footer widget, I've embedded the following:

    <img src="http://victorybc.net/wp-content/uploads/2012/12/4-front.jpg" style="visibility:hidden" class="colorbox-link-1 cboxElement" />
    
    <img src="http://victorybc.net/wp-content/uploads/2012/12/8-gazebo.jpg" style="visibility:hidden" class="colorbox-link-1 cboxElement" />
    
    <img src="http://victorybc.net/wp-content/uploads/2012/12/3-front.jpg" style="visibility:hidden" class="colorbox-link-1 cboxElement" />

    I've also tried using display:none, but with no luck.

    I believe that the problem is due to the "Class" on the URL in a menu item being directed to the <li> element instead of the <a> element.

    Any thoughts or am I doing something totally wrong? Thanks again.

  6. techotronic
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    yes, the problem is that you have inserted <img> tags with the class colorbox-link-1.
    The link-functionality will only work for <a> tags.

    The following should work:
    <a href="http://victorybc.net/wp-content/uploads/2012/12/4-front.jpg" style="visibility:hidden" class="colorbox-link-1" />

    Cheers,
    Arne

  7. harringtondavida@yahoo.com
    Member
    Posted 1 year ago #

    So...I guess that's the dilemma. There isn't a way that I'm aware of to do this on a menu item. The only options that you have are to add a URL. The classes you add get assigned automatically to the li element and I don't know of a way to change this. Am I missing something?

    As a side note, it would be really great to have a custom menu option as part of the colorbox plugin that just let's you choose which pictures to include and then when clicked, the slide show starts. Of course, I say that like its something simple...:)

    Thanks again for your help.

  8. harringtondavida@yahoo.com
    Member
    Posted 1 year ago #

    Ok...I figured out that you were talking about changing the widget code and not the menu code, so I've updated it that way and still no joy...

    Any other ideas?

  9. harringtondavida@yahoo.com
    Member
    Posted 1 year ago #

    I don't want to pester you, because I know you're probably really busy with stuff, but any ideas what I can do to make this work? Thanks again.

  10. techotronic
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    unfortunately, as you already said, there doesn't seem to be a way to add CSS classes to menu items from the WordPress backend. :-(

    Cheers,
    Arne

  11. harringtondavida@yahoo.com
    Member
    Posted 1 year ago #

    Yeah. That's what I was afraid of... :)

    Thanks for looking at it for me. I'm going to keep trying and if I figure it out, I'll let you know.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic