Forums

Lightbox 2
limit plugin to only single post?? (2 posts)

  1. azn137
    Member
    Posted 3 months ago #

    How do you limit the plugin to being loaded ONLY on single posts and pages? I've tried to modified the code, but it seems to not do anything at all.

    global $post;
    if (!is_single($post) && !is_admin()) { // if we are *not* viewing an admin page, like writing a post or making a page:
    	wp_enqueue_script('lightbox', ($stimuli_lightbox_plugin_prefix.$stimuli_lightbox_js), array('scriptaculous-effects'), '1.8');
    }

    Please help...

    http://wordpress.org/extend/plugins/lightbox-2/

  2. azn137
    Member
    Posted 3 months ago #

    I meant
    (is_single($post)
    and not
    (!is_single($post)
    Anyone?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags