Jump to content
kr55

Homepage Feed of Mixed Content in Cadence

Recommended Posts

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 by kr55

Share this post


Link to post
Share on other sites

^ Would anyone be so kind to point me to an example for how to build this template? I'm a noob.

Share this post


Link to post
Share on other sites

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
 

Share this post


Link to post
Share on other sites

You could also look into modulus.. I think it could be done like:

<?php
	if ($count % 5 == 0) {
		// display banner
	}
?>

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...