Support » Plugin: WP Gallery Custom Links » Links not working in sidebar widget

  • Resolved groston


    Thanks for providing this plugin!

    The site listed above uses both BuddyPress and WooCommerce. (Note – I am not the developer – I am helping to maintain/tweak the site. Note further that this is a clone of the live site used for testing.)

    I would like to show a limited number of images in the sidebar and have them linked to external URLs. To achieve this I: 1) added a WP Gallery widget to the sidebar, 2) installed and activated this plugin, 3) added external URLs to the three media files shown, and 4) updated the sidebar gallery.

    Sadly, the custom URLs are not showing up in the gallery. I tried all settings for ‘Link to’ and both settings for ‘Gallery Link OnClick Effects’ all to no avail.

    Any suggestions?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author johnogg


    Check out the comments at for info on fixing this.


    Thanks for the reply. I did as suggested, changed one line of code and commented out three others. I then cleared by browser cache, but no change in behavior. I again tried all settings for ‘Link to’ and saw the expected behavior, so the gallery/widget is fundamentally working…


    Sorry – my bad. For some reason, when I cut/paste single quotes, they sometimes get screwed up and become ` and something else. Anyway, that’s what happened – your fix did the job – thanks!


    As per the instructions I replaced:

    //$attachment_ids = array();
    $attachment_ids = $attr[‘ids’];

    and commented out:
    //if( isset( $attr[‘include’] ) ) {
    //$attachment_ids = array_merge( $attachment_ids, explode( ‘,’, $attr[‘include’] ) );
    However, this did not work for me and I did ensure the quotes were replaced with proper single quotes in Notepad, and set the images to ‘Link To: Attachment Page’

    The plugin works perfectly on a normal page, but not in the footer Gallery widget.

    I would appreciate any guidance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Links not working in sidebar widget’ is closed to new replies.