WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. azn137
    Member
    Posted 2 years 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 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags