WordPress.org

Support

Support » Plugins and Hacks » [Resolved] How to disable thickbox on some pages

[Resolved] How to disable thickbox on some pages

  • robertrafai
    Member

    @robertrafai

    I need to disable thickbox on some pages because I use my default theme gallery on few pages and I don’t need to load images with thickbox.
    Now I’m getting double gallery window when I’m click on image thumbnail and biger image pop up. And those images are not assignet to nextgen gallery at all.
    http://www.robertrafai.com/party/
    At blog forum, everything is OK, before updating theme also in couples, party etc everything was ok too, after updating theme, every image is opened by thick box?!!?
    Is there some custom field code to disable nextgen and thickbox loading on those pages?

    http://wordpress.org/extend/plugins/auto-thickbox-plus/

Viewing 5 replies - 1 through 5 (of 5 total)
  • robertrafai
    Member

    @robertrafai

    solved
    There is option for that 🙂

    Atomusan
    Member

    @atomusan

    Can you explain how to activate the option? Thanks!

    robertrafai
    Member

    @robertrafai

    just looking but can’t remember where I done what :(. If I remember, I’ll write here

    Atomusan
    Member

    @atomusan

    Thanks, let me know if you do.

    Hi guys,

    I actually JUST needed to do this myself. Here’s how I did it.

    Open the auto-thickbox.php through WordPress’s plugin editor.

    Scroll down to “function custom_scripts() {” and after the line
    var nothickbox = ['<?php echo str_replace(' ', '\', \'', trim($this->options['no_thickbox'])); ?>'];

    Add the following:

    <?php
    global $post;
    $postID = $post->ID;
    if ($postID == 366 ) {
    ?>
    
    return false;
    
    <?php
    }
    ?>

    Basically, you’re telling the JavaScript that it shouldn’t run — almost as if it found a “no_thickbox” tag.

    This isn’t the best way to do it. But if you don’t care, then it works. Be sure to replace the postID with your own ID(s).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] How to disable thickbox on some pages’ is closed to new replies.