[Resolved] 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.)
- The topic ‘[Resolved] Loading template twice – how to do it?’ is closed to new replies.