I came across a very different scenario where I had to use get_sidebar('recommendations')
multiple times on one page. But it works only one time.
It works multiple times only when I use include('sidebar-recommendations.php')
but I want to go with standardize way in WordPress.
I searched in the code but couldn’t find the reason why It doesn’t work multiple times?
3 Answers
You can’t.
get_template() function has a protection against this.
You will have to use include().