• lightbox-2-wordpress-plugin.1.7 (= Lightbox JS v2.03.3) works fine, but it doesn’t work in posts on my homepage outside WordPress.

    I’ve included WP posts in an external index.php page using this method:

    <?
    require ‘blog/wp-blog-header.php’;
    ?>

    <html>

    … etc. …

    <? if (have_posts()) : while (have_posts()) : the_post(); ?>

    … etc. …

    </html>

    The index posts are fully functional. Why doesn’t the lightbox plugin work on the external page? How can I fix it?

    I’ve tried replacing the $lightbox_path with the full address, but that had no effect.

    Is there another Lightbox plugin I should try? I do like this one (Lightbox JS v2.03.3).

Viewing 1 replies (of 1 total)
  • Thread Starter Modifiedcontent

    (@modifiedcontent)

    Fixed it by adding this to the outside index.php:

    <script type=”text/javascript”> lb_path = “blog/wp-content/plugins/lightbox/”; </script>
    <link rel=”stylesheet” href=”blog/wp-content/plugins/lightbox/lightbox.css” type=”text/css” media=”screen” />
    <script type=”text/javascript” src=”blog/wp-content/plugins/lightbox/prototype.js”></script>
    <script type=”text/javascript” src=”blog/wp-content/plugins/lightbox/scriptaculous.js?load=effects”></script>
    <script type=”text/javascript” src=”blog/wp-content/plugins/lightbox/lightbox.js”></script>

    Is there a cleaner way to do it? Perhaps some php include?

Viewing 1 replies (of 1 total)
  • The topic ‘Lightbox plugin doesn’t work on external homepage’ is closed to new replies.