WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: jQuery Colorbox] manual grouping (6 posts)

  1. qg
    Member
    Posted 4 years ago #

    Hi,

    I'm trying to group a series of images together, but since the images are hardcoded in a WP template page, I can't seem to group them together.

    Is there a way to to make them part of a group?

    The url is http://www.quantumgrey.com. Look under portfolio.

    Thanks.

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

  2. techotronic
    Member
    Posted 4 years ago #

    Hi,

    since on that site there are no post/page contents (images) displayed that would get an automatic colorbox-class, you could go ahead and fake a post/page id.
    Instead of giving them the class "colorbox-manual" give them e.g. "colorbox-123" or "colorbox-999" (just any number, doesn't matter which)

    Or you could open the file "colorbox-javascript.php" and delete lines 31-34:

    <?php  //if groudId is colorbox-manual, set groupId to "nofollow" so that images with that class are not grouped ?>
     if ($groupId == "colorbox-manual") {
      $groupId = "nofollow";
    }

    Best regards,
    Arne

  3. qg
    Member
    Posted 4 years ago #

    Thank you very much for the quick reply.

    I'm not sure where the class "colorbox-manual" goes (even though by using Firebug I see it on the blog page).

    The code I use to place the images is this:

    <a>/images/portfolio/eaGolem.jpg" rel="gallery"><img src="<?php bloginfo('template_directory') ?>/images/thumbs/eaGolem_tmb.jpg" width="230" height="115" alt="Golem"></a>
    
    <a>/images/portfolio/eaBMmaze.jpg" rel="gallery"><img src="<?php bloginfo('template_directory') ?>/images/thumbs/eaBMmaze_tmb.jpg" width="230" height="115" alt="Businessman in maze"></a>

    Where would I put the div class?

    I'm not very technical unfortunately, so I'm fumbling a bit. Thanks for the patience.

    I'll try removing the lines you suggested, but personally, I'd rather keep your pluging as intact as possible.

    Thanks again.

  4. qg
    Member
    Posted 4 years ago #

    double post...

  5. techotronic
    Member
    Posted 4 years ago #

    Hi,
    the class needs to be added to the <img> tags.
    I.e.:
    <img class="colorbox-123" src="<?php bloginfo('template_directory') ?>/images/thumbs/eaGolem_tmb.jpg" width="230" height="115" alt="Golem"/>

    If you also add a title attribute, the title will be displayed in the colorbox.

    <img class="colorbox-123" src="<?php bloginfo('template_directory') ?>/images/thumbs/eaGolem_tmb.jpg" width="230" height="115" alt="Golem" title="Golem"/>

    Best regards,
    Arne

  6. qg
    Member
    Posted 4 years ago #

    Thank you very much, Arne. Much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic