Viewing 7 replies - 1 through 7 (of 7 total)
  • Your template doesn’t seem to be running the the_content-filter properly.

    If you don’t want to change that, just wrap your template gallery output with a call to jqlb_apply_lightbox($your_content);

    Thread Starter omniafausta

    (@omniafausta)

    hi, not sure if I ‘don’t want to change that’, because I am not sure how I should run it properly.
    I have adapted a theme, but I am not what you would call fluent in php or js…

    I will look into this and try to find out more about the_content-filter

    thanks!
    I’ll keep you updated.

    Thread Starter omniafausta

    (@omniafausta)

    ok, I am totally flabbergasted what to do, sorry…

    I’ll ask someone I know with more knowledge than me about php and js what to do.

    Cool.

    Yeah. Basically; just make sure your template is implementing the loop properly and running the_post somewhere in there.

    Thread Starter omniafausta

    (@omniafausta)

    my single.php does not call the loop. (the single.php file is where I have added the short code)
    It does have the_post in this line:
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    anyway gonna ask my friend to help me now.

    Thread Starter omniafausta

    (@omniafausta)

    ok, fixed it.

    changed

    <div id="auto-gallery" class="gallery"> <?php echo do_shortcode('[gallery link="file" column="1" size="medium"]'); ?></div>

    to
    <div id="auto-gallery" class="gallery"> <?php echo jqlb_apply_lightbox(do_shortcode('[gallery link="file" column="1" size="medium"]')); ?></div>

    thanks!

    Thanks for sharing the solution. It seems the do_shortcode-call doesn’t run all filters. Or maybe your call to do_shortcode happens before the my filter has been registered.

    I need to look into that.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘problem with gallery in template’ is closed to new replies.