Messing with multiple loops
-
Hi,
Im working on a custom template, and id want to know if it’s possible to achieve what i need.
I have several columns with one image for each post. When i hover on images, post title appears in a totally different spot (at the moment, on top of the column).
My solution was just to use one loop for each column, css to switch visibility of the title div, and absolute positioning to push it on the top of the column. dirty but functional.
However now i need to split the image code and the title code in two totally different and unrelated divs, allowing me to put the “rolling title” div wherever i need.So i need some method to “link” two different loops (assuming i have to start another loop for the title div), passing the title variable of the current hovered post to the other loop, in order to display it.
Another option is to make the “rolling title” display all the titles and than change visibility dinamically through php\css, something like#title-<?php the_ID(); ?> {visibility:hidden;} #picture-<?php the_ID(); ?>:hover #title-<?php the_ID(); ?> { visibility: visible; }
I know it’s kinda messy, i hope i was clear in my explanation.
Thank you all in advance..
- The topic ‘Messing with multiple loops’ is closed to new replies.