Gallery with No Image Links
3.5.1 Compatibility (2 posts)

  1. AndyWarren
    Posted 2 years ago #

    Just installed this on WordPress 3.5.1 and it appears to have no affect at all. Is it not compatible with the newest WordPress version?


  2. sushicodeur
    Posted 2 years ago #

    I tried the plugin as well, and it has no effect at all, here is how I rewrite it :

    add_action('after_setup_theme', 'sushi_after_setup_theme');
    function sushi_after_setup_theme()
        add_shortcode('gallery', 'sushi_link_none_gallery_shortcode', 10, 1);
    function sushi_link_none_gallery_shortcode($attr)
        $output = gallery_shortcode($attr);
        if($attr['link'] == "none") {
            $output = preg_replace(array('/<a[^>]*>/', '/<\/a>/'), '', $output);
        return $output;

    The important part in this code is to place your code in an after_setup_theme handler.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gallery with No Image Links
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic