Aalok Posted April 24, 2021 Share Posted April 24, 2021 Site URL: https://www.dualstarinnovation.com/ I have a site with multiple 'blog' collection pages (one for projects, insights, and press releases). I want a grid layout for the projects and insights page, but a stacked layout for the press release/news page. I know I can change the blog layout in the style editor, but that changes it site-wide. Is there a way to individually change the blog layout for each page? I think I'm just using the default template. Link to comment
Solution creedon Posted April 25, 2021 Solution Share Posted April 25, 2021 The following solution requires the business plan or above. Add the following to Blog Settings > Advanced > Page Header Code Injection for the blog page you want in the stacked style. <script> /* begin change blog style from grid to stacked SS Version : 7.0 Template : Brine ( Aria, Blend, Cacao, Clay, Fairfield, Feed, Foster, Greenwich, Hatch, Heights, Hunter, Hyde, Impact, Jaunt, Juke, Keene, Kin, Lincoln, Maple, Margot, Marta, Mentor, Mercer, Miller, Mojave, Moksha, Motto, Nueva, Pedro, Pursuit, Rally, Rover, Royce, Sofia, Sonora, Stella, Thorne, Vow, Wav, West ) your template is not listed? then it is not currently supported */ window.addEventListener ( 'DOMContentLoaded', ( ) => { const classList = document.body.classList; classList.add ( 'tweak-blog-list-style-stacked' ) classList.remove ( 'tweak-blog-list-style-grid' ); } ); /* end change blog style from grid to stacked */ </script> This is for v7.0 using the Brine template family. Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Aalok Posted April 25, 2021 Author Share Posted April 25, 2021 26 minutes ago, creedon said: The following solution requires the business plan or above. Add the following to Blog Settings > Advanced > Page Header Code Injection for the blog page you want in the stacked style. <script> /* begin change blog style from grid to stacked SS Version : 7.0 Template : Brine ( Aria, Blend, Cacao, Clay, Fairfield, Feed, Foster, Greenwich, Hatch, Heights, Hunter, Hyde, Impact, Jaunt, Juke, Keene, Kin, Lincoln, Maple, Margot, Marta, Mentor, Mercer, Miller, Mojave, Moksha, Motto, Nueva, Pedro, Pursuit, Rally, Rover, Royce, Sofia, Sonora, Stella, Thorne, Vow, Wav, West ) your template is not listed? then it is not currently supported */ window.addEventListener ( 'DOMContentLoaded', ( ) => { const classList = document.body.classList; classList.add ( 'tweak-blog-list-style-stacked' ) classList.remove ( 'tweak-blog-list-style-grid' ); } ); /* end change blog style from grid to stacked */ </script> This is for v7.0 using the Brine template family. Let us know how it goes. Thank you! Yes it worked! creedon 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment