kr55 Posted September 17, 2020 Share Posted September 17, 2020 (edited) I'm trying to create an endless scroll homepage that consists of a mix of content pulled from separate pages, displayed in a standardized cadence. For example: for every 5 blog posts, show 1 work sample. The content will be primarily hyperlinked images or video with caption underneath. Edited September 17, 2020 by kr55 Link to comment Share on other sites More sharing options...
kr55 Posted September 17, 2020 Author Share Posted September 17, 2020 ^ Would anyone be so kind to point me to an example for how to build this template? I'm a noob. Link to comment Share on other sites More sharing options...
ngrmm Posted September 18, 2020 Share Posted September 18, 2020 search for array chunk. you could divide all your blog-posts into segments with five posts. and add a work sample add the end of the segment Link to comment Share on other sites More sharing options...
kr55 Posted September 18, 2020 Author Share Posted September 18, 2020 Thanks! Link to comment Share on other sites More sharing options...
louisstephens Posted September 18, 2020 Share Posted September 18, 2020 You could also look into modulus.. I think it could be done like: <?php if ($count % 5 == 0) { // display banner } ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now