Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • maltham

    (@maltham)

    +1

    Thread Starter maltham

    (@maltham)

    Thanks DeBAAT.

    I tried [gallery ids="20,18,19"] and found the problem still existed: after clicking on one of the images and then next/previous I would eventually get images from outside the gallery.

    I couldn’t get any output from [wp-mcm alternative_shortcode=”gallery” category=”canada”] but on the assumption it would replicate the same problem I did the following in my child theme functions.php

    1) add_filters to intercept the following:
    add_filter(‘next_image_link’, ‘my_next_image_link’, 1, 2);
    add_filter(‘previous_image_link’, ‘my_previous_image_link’, 1, 2);

    2) add functions my_next_image_link (and previous) to allow a custom function my_adjacent_image_link which replaces the one in media.php

    eg

    function my_previous_image_link($size = ‘thumbnail’, $text = false) {
    my_adjacent_image_link(true, $size, $text);

    3) In this new function I check the category of adjacent images and if not the same as the original image then skip along the image array until a match is found.

    Not really a problem of WP-MCM but it allows me to keep your fantastic image categorisation system.

    Thanks again

    Thread Starter maltham

    (@maltham)

    Fixed it: The problem is caused when using an “add event” page at the normal level of a page.

    The fix is to make sure the page is a child of the Events page (or rather that the parent of the “Add Event” page is “Events”

    Thread Starter maltham

    (@maltham)

    it only happens when I use the front end form. (Using the WordPress admin is fine – the pictures have absolute addresses)

Viewing 4 replies - 1 through 4 (of 4 total)