Block is not showing up in a custom taxonomy page template I am using Drupal 7
I have a content type courses. I have a page folder in template folder, with courses.tpl.php file. When i go to courses page it is showing contents from courses.tpl.php. Issues is that courses.tpl.php is not rendering blocks.

I checked region in info file. I cleared cache etc, but block is not rendering.
I am not sure, if this page is a taxonomy page. 'footer_testimonials' is the block i am trying to render in this page, but it is not showing up. 

'footer_testimonials' is showing up in page.tpl.php but not in courses.tpl.php

&lt;div id="innerCourse_area"&gt;
    &lt;div id="searchbox"&gt;
    &lt;?php print drupal_render(drupal_get_form('course_searchbox'));?&gt;
    &lt;/div&gt;
    &lt;div id="innerTopRight_info"&gt;&lt;?php print $page['page']['course_page_top_ad']['block_1']['#markup'];?&gt;&lt;/div&gt;
    &lt;div class="clearfix"&gt;&lt;/div&gt;
    &lt;h4&gt;Popular Courses: &lt;em&gt;Certificate IV in Bookkeeping, Diploma of Accounting, Diploma of Business, Advanced Diploma of Accounting&lt;/em&gt;&lt;/h4&gt;

&lt;/div&gt;&lt;!--end inner course area--&gt;
&lt;div class="innerRightCol"&gt;
&lt;h1&gt;Courses&lt;/h1&gt;
&lt;div class="contentInfo"&gt;
    Central College Distance Education offers a range of Government and Industry Accredited courses ready to help launch your career.  Remember, Central College has been launching careers for over 30 years.  You may also be interested in our specialty Central College Certificates that will help you better manage your existing business and do it in your own time at your own pace, right in the comfort of your home.


&lt;/div&gt;

&lt;?php
//$taxoTerm = course::get_taxonomy_term(1);
$categories = course::getAllCategories();

foreach($categories as $category):?&gt;
    &lt;div class="course_cats"&gt;
        &lt;div class="taxo_term"&gt;&lt;h3&gt;&lt;?php echo $category-&gt;name;?&gt; Courses&lt;/h3&gt;&lt;/div&gt;
        &lt;div class="taxo_courses"&gt;
            &lt;?php //get courses by taxonomy
                $courses_term = course::courses_by_term($category-&gt;tid);
                $i = 0;
                foreach($courses_term as $course):
                $courseObj = course::getCourseByNid($course-&gt;nid);
                    $i++;
                ?&gt;
                &lt;li&gt;&lt;a href="&lt;?php echo course::courseUrl_alias($course-&gt;nid);;?&gt;"&gt;&lt;?php echo $courseObj-&gt;title;?&gt;&lt;/a&gt;&lt;/li&gt;
                &lt;?php endforeach;?&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;?php
if($i%2==0):
    echo '&lt;div class="clearfix"&gt;&lt;/div&gt;';
endif;


endforeach;
?&gt;
&lt;div class="clearfix"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;!--end innerRightCol--&gt;

&lt;div class="innerLeftCol"&gt;
    &lt;h2&gt;Testimonials&lt;/h2&gt;
    &lt;div&gt;
&lt;?php print render($page['footer_testimonials']);?&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;!--end innerLeftCol--&gt;
A page.tpl.php template file doesn't get blocks to render; it gets the theme regions to render, which by default are the following ones:


$page['help']: Dynamic help text, mostly for admin pages
$page['highlighted']: Items for the highlighted content region
$page['content']: The main content of the current page
$page['sidebar_first']: Items for the first sidebar
$page['sidebar_second']: Items for the second sidebar
$page['header']: Items for the header region
$page['footer']: Items for the footer region


Themes can define other regions as well. 

When you want to show a blocks that has been associated to the "highlighted" region, the page template file needs to contain the following code (or similar).

&lt;?php if ($page['highlighted']): ?&gt;&lt;div id="highlighted"&gt;&lt;?php print render($page['highlighted']); ?&gt;&lt;/div&gt;&lt;?php endif; ?&gt;


Without that code, a block that should visible in the "highlighted" region would not be visible.

In a taxonomy term template file, you need to get the block content using code similar to the following one.

  global $theme_key;

  $query = db_select('block', 'b');
  $block = $query
    -&gt;fields('b')
    -&gt;condition('b.theme', $theme_key)
    -&gt;condition('b.status', 1)
    -&gt;condition('b.delta', $delta)
    -&gt;condition('b.module', $module)
    -&gt;orderBy('b.region')
    -&gt;orderBy('b.weight')
    -&gt;orderBy('b.module')
    -&gt;addTag('block_load')
    -&gt;addTag('translatable')
    -&gt;execute()
    -&gt;fetchObject();

  if ($block) {
    $array = module_invoke($block-&gt;module, 'block_view', $block-&gt;delta);
    drupal_alter(array('block_view', "block_view_{$block-&gt;module}_{$block-&gt;delta}"), $array, $block);

    if (isset($array) &amp;&amp; is_array($array)) {
      foreach ($array as $k =&gt; $v) {
        $block-&gt;$k = $v;
      }
    }

    if (isset($block-&gt;content) &amp;&amp; $block-&gt;content) {
      // Normalize to the drupal_render() structure.
      if (is_string($block-&gt;content)) {
        $block-&gt;content = array('#markup' =&gt; $block-&gt;content);
      }

      print render($block-&gt;content);
    }
  }


You need to know the module implementing the block, and the delta used for that block. It is better to put the code in the preprocess function to set a variable that is then rendered in the template file. As usual, the logic code should be in the template.php file of the theme, or in the module file, and the rendering code in the template file. (Don't confuse the template.php file with the template file.)

Instead of executing that code, it is easier to assign the block you want to show in the taxonomy term page to taxonomy term pages. In the settings page for the block (admin/structure/block/manage/&lt;block id&gt;/form/configure) select Only the listed pages, and in the textarea enter:


  taxonomy/term
  taxonomy/term/*