WordPress.org

Ready to get started?Download WordPress

Forums

Auto ThickBox Plus
[resolved] How to disable thickbox on some pages (6 posts)

  1. robertrafai
    Member
    Posted 1 year ago #

    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/

  2. robertrafai
    Member
    Posted 1 year ago #

    solved
    There is option for that :)

  3. Atomusan
    Member
    Posted 8 months ago #

    Can you explain how to activate the option? Thanks!

  4. robertrafai
    Member
    Posted 8 months ago #

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

  5. Atomusan
    Member
    Posted 8 months ago #

    Thanks, let me know if you do.

  6. mikehaberle
    Member
    Posted 6 months ago #

    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).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic