• Preston

    (@firebot)


    I’ve been working on making custom outputs (or “templates,” whichever is easier to think of them as) for the gallery shortcode using something similar to this ( https://pastebin.com/mXxzuSMb ) in my functions.php file.

    It’s been working great, except I need to figure out a way to have several different outputs defined, and then be able to tell the shortcode which one to use. For example, I need the output markup to be different on the home page than it is on the gallery pages. Mostly for styling and jquery purposes.

    I’m using this call within my templates to add the galleries (in case that affects anything):
    <?php echo do_shortcode('[gallery itemtag="li" icontag="span" size="full"]'); ?>

    I appreciate any help!

  • The topic ‘Specify different output "templates" for gallery shortcode’ is closed to new replies.