Support » Fixing WordPress » [Plugin: Flickr Gallery] Using Flickr-Gallery In Template

  • I’d like to use this plugin to display a photostream on my custom homepage. Obviously, as it’s neither a page nor a post, shortcode doesn’t get replaced. I love this extension’s functionality in other parts of my site and would really like a way to use it on my front page. Is there a way to call it from a template?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can use any shortcode directly in a template file like thus:

    <?php echo do_shortcode('[foo bar=1]') ?>

    thanks a ton ^_^

    If I put: [flickr-gallery mode=”tag” tags=”Vassar” tag_mode=”all”] into my templated page, the gallery gets added to the bottom.

    If I do <?php echo do_shortcode(‘[flickr-gallery mode=”tag” tags=”Vassar” tag_mode=”all”]’)?> then the text up to the gallery is printed, then the gallery, but then rest of the template/page content isn’t displayed!

    I should maybe clarify a little more… I’ve got a page template that does the following:

    <?php get_header(); ?>
            <div id="content">
                    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                    <h1 class="alt"><?php the_title(); ?></h1>
                    <?php the_content(); ?>
                    <?php endwhile; endif; ?>
                    <p class="top"><a href="/the-route/">Back to map</a></p>                        
            </div> <!--/content-->
    <?php get_footer(); ?>

    All the short codes that I include in the page content do not get included in the_content(), but instead are all slapped in at the end of that first </div>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Flickr Gallery] Using Flickr-Gallery In Template’ is closed to new replies.