WordPress.org

Ready to get started?Download WordPress

Forums

Customizing the gallery shortcode on a global level (2 posts)

  1. Paul
    Member
    Posted 3 years ago #

    This text is mentioned In the Codex page concerning the gallery shortcode:

    You can also print a gallery directly in a template like so:
    <?php echo do_shortcode('[gallery option1="value1"]'); ?>

    There's no other information about this. I'm a little confused about customizing galleries. I would rather make changes on a global level, and not have to specify options each time I use the shortcode (in posts), but it's unclear to me exactly where I would use the code above. Which "template" is this referring to? Is there a dedicated galley template that I don't know about?

    Thanks!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    No - it means whatever template file you want to incorporate a gallery into.

Topic Closed

This topic has been closed to new replies.

About this Topic