Guðmundur Karl Einarsson

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
URL to the page in question:
  • Author
    Posts
  • in reply to: Disable Lightbox on a specific page #8812

    Thank you Bill

    At first this method did not work as I always got both lightboxes.

    But when I removed the is_admin() part is worked allright. The query is now:

    if(!is_page(1246) ){

    as the 1246 is the page number.

    in reply to: Gallery shortcode does not accept extra values #8811

    I actually found a solution to the problem by editing the ot-gallery.php.

    Instead for the code:

    // get attachments
    If (Empty($attr['include'])) // this gallery uses the post attachments
    $attachments = get_children(Array(
    'post_parent' => $attr['id'],
    'exclude' => $attr['exclude'],
    'post_status' => $attr['post_status'],
    'post_type' => $attr['post_type'],
    'post_mime_type' => $attr['post_mime_type'],
    'order' => $attr['order'],
    'orderby' => $attr['orderby'] ));

    Else // this gallery only includes images
    $attachments = get_posts(Array(
    'include' => $attr['include'],
    'post_status' => $attr['post_status'],
    'post_type' => $attr['post_type'],
    'post_mime_type' => $attr['post_mime_type'],
    'order' => $attr['order'],
    'orderby' => $attr['orderby'] ));

    // There are no attachments
    If (Empty($attachments)) return False;

    I changed it to this:

    // get attachments

    IF (isset($attr['ids'])) // Ef ids er skilað
    $attachments = get_posts(Array(
    'include' => $attr['ids'],
    'post_status' => $attr['post_status'],
    'post_type' => $attr['post_type'],
    'post_mime_type' => $attr['post_mime_type'],
    'order' => $attr['order'],
    'orderby' => 'post__in' ));

    ElseIf (Empty($attr['include'])) // this gallery uses the post attachments
    $attachments = get_children(Array(
    'post_parent' => $attr['id'],
    'exclude' => $attr['exclude'],
    'post_status' => $attr['post_status'],
    'post_type' => $attr['post_type'],
    'post_mime_type' => $attr['post_mime_type'],
    'order' => $attr['order'],
    'orderby' => $attr['orderby'] ));

    Else // this gallery only includes images
    $attachments = get_posts(Array(
    'include' => $attr['include'],
    'post_status' => $attr['post_status'],
    'post_type' => $attr['post_type'],
    'post_mime_type' => $attr['post_mime_type'],
    'order' => $attr['order'],
    'orderby' => $attr['orderby'] ));

    // There are no attachments
    If (Empty($attachments)) return False;

    And it works like a charm with your beautiful lightbox 🙂

    in reply to: Gallery shortcode does not accept extra values #8808

    Thank you Bill for the information. I’ll continue to experiment with this 🙂

Viewing 3 posts - 1 through 3 (of 3 total)