Support » Theme: Sugar and Spice » Page Template with Default Gallery

  • Resolved ColumbiaWebDev


    LOVE your theme! I’m interested, however, in defaulting back to the main gallery style of thumbnails in columns (instead of a full-size slideshow) on a few pages. I was thinking I’d add a page template with the gallery function calls. Could you point me in the right direction with the code? I’m wondering what files/code/function calls, etc your theme modifies or overwrites. TIA!!

Viewing 1 replies (of 1 total)
  • OK, I figured this out (for anyone else wanting to do the same thing).

    1. create your new page template (in this case, I copied the Full Width Page Template and called it Photo Gallery Template)

    2. Add this code to the top of the page template, just after the get_header() call:

       // Reset the filters to display the default gallery instead of the theme style galleries
       remove_filter( 'post_gallery', 'sugarspice_post_gallery' );
       add_filter( 'use_default_gallery_style', '__return_true' );

    Hope that helps someone!

Viewing 1 replies (of 1 total)
  • The topic ‘Page Template with Default Gallery’ is closed to new replies.