I have items to display in my wordpress sidebar. Let’s say div1, div2, div3.
My client would like to repeat the sequence of items in the sidebar to fill the height of the sidebar to match the height of the main content area. So, if each div is 200px height and the content in the main div on given page is 1000px, then there should be div1, div2, div3, div1, div2.
I know how to code php and write the loop, but how to know how many loops to run?
Although I think it’s a bit silly, my client is adamant about this.
I wound up doing this with jQuery. It’s not a floating sidebar, it actually adds img tags as needed to whatever is there already, until no more fit.