Loading template twice – how to do it?
-
I have a template that I’d like to use several times on a page. I use
include( get_stylesheet_directory() . '/ads.php');
and this works for the first instance. But on the second it doesn’t. Apparently it is only possible to include it once. So I tried:
locate_template( array( 'ads.php' ), true, false );
But to no avail. And get_template_part doesn’t do the trick either.Which is the correct way to do it? (I want do use it in the Loop, to include a block of ads every 3rd post on my homepage.)
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Loading template twice – how to do it?’ is closed to new replies.