title: html href link showing instead of title php
body: <p>For some reason the related products on one of my woocommerce sites have started showing the full HTML Link instead of the product title. </p>
  
  <p>I've narrowed it down to being an issue with the theme as the title show properly when the theme is switched. I've also tried removing all my custom CSS and deactivating all the plugins. </p>
  
  <p>Here is the code for my related.php</p>
  
  <pre><code>    &lt;?php
  
  // Disable direct call
  if ( ! defined( 'ABSPATH' ) ) { exit; }
  
  
  /* Theme setup section
  -------------------------------------------------------------------- */
  
  if ( !function_exists( 'kingler_theme_template_related_theme_setup' ) ) {
      add_action( 'kingler_theme_action_before_init_theme', 'kingler_theme_template_related_theme_setup', 1 );
      function kingler_theme_template_related_theme_setup() {
          kingler_theme_add_template(array(
              'layout' =&gt; 'related',
              'mode'   =&gt; 'blog',
              'need_columns' =&gt; true,
              'need_terms' =&gt; true,
              'title'  =&gt; esc_html__('Related posts /no columns/', 'kingler-theme'),
              'thumb_title'  =&gt; esc_html__('Medium square image (crop)', 'kingler-theme'),
              'w'      =&gt; 370,
              'h'      =&gt; 370
          ));
          kingler_theme_add_template(array(
              'layout' =&gt; 'related_2',
              'template' =&gt; 'related',
              'mode'   =&gt; 'blog',
              'need_columns' =&gt; true,
              'need_terms' =&gt; true,
              'title'  =&gt; esc_html__('Related posts /2 columns/', 'kingler-theme'),
              'thumb_title'  =&gt; esc_html__('Medium square image (crop)', 'kingler-theme'),
              'w'      =&gt; 370,
              'h'      =&gt; 370
          ));
          kingler_theme_add_template(array(
              'layout' =&gt; 'related_3',
              'template' =&gt; 'related',
              'mode'   =&gt; 'blog',
              'need_columns' =&gt; true,
              'need_terms' =&gt; true,
              'title'  =&gt; esc_html__('Related posts /3 columns/', 'kingler-theme'),
              'thumb_title'  =&gt; esc_html__('Medium square image (crop)', 'kingler-theme'),
              'w'      =&gt; 370,
              'h'      =&gt; 370
          ));
          kingler_theme_add_template(array(
              'layout' =&gt; 'related_4',
              'template' =&gt; 'related',
              'mode'   =&gt; 'blog',
              'need_columns' =&gt; true,
              'need_terms' =&gt; true,
              'title'  =&gt; esc_html__('Related posts /4 columns/', 'kingler-theme'),
              'thumb_title'  =&gt; esc_html__('Medium square image (crop)', 'kingler-theme'),
              'w'      =&gt; 370,
              'h'      =&gt; 370
          ));
      }
  }
  
  // Template output
  if ( !function_exists( 'kingler_theme_template_related_output' ) ) {
      function kingler_theme_template_related_output($post_options, $post_data) {
          $show_title = true; //!in_array($post_data['post_format'], array('aside', 'chat', 'status', 'link', 'quote'));
          $parts = explode('_', $post_options['layout']);
          $style = $parts[0];
          $columns = max(1, min(12, empty($post_options['columns_count']) 
                                      ? (empty($parts[1]) ? 1 : (int) $parts[1])
                                      : $post_options['columns_count']
                                      ));
          $tag = kingler_theme_in_shortcode_blogger(true) ? 'div' : 'article';
  
          if ($columns &gt; 1) {
              ?&gt;&lt;div class="&lt;?php echo 'column-1_'.esc_attr($columns); ?&gt; column_padding_bottom"&gt;&lt;?php
          }
          ?&gt;
          &lt;&lt;?php kingler_theme_show_layout($tag); ?&gt; class="post_item post_item_&lt;?php echo esc_attr($style); ?&gt; post_item_&lt;?php echo esc_attr($post_options['number']); ?&gt;"&gt;
  
              &lt;div class="post_content"&gt;
                  &lt;?php if ($post_data['post_video'] || $post_data['post_thumb'] || $post_data['post_gallery']) { ?&gt;
                  &lt;div class="post_featured"&gt;
                      &lt;?php
                      kingler_theme_template_set_args('post-featured', array(
                          'post_options' =&gt; $post_options,
                          'post_data' =&gt; $post_data
                      ));
                      get_template_part(kingler_theme_get_file_slug('templates/_parts/post-featured.php'));
                      ?&gt;
                  &lt;/div&gt;
                  &lt;?php } ?&gt;
  
                  &lt;?php if ($show_title) { ?&gt;
                      &lt;div class="post_content_wrap"&gt;
                          &lt;?php
                          if (!isset($post_options['links']) || $post_options['links']) { 
                              ?&gt;&lt;h5 class="post_title"&gt;&lt;a href="&lt;?php echo esc_url($post_data['post_link']); ?&gt;"&gt;&lt;?php kingler_theme_show_layout($post_data['post_title']); ?&gt;&lt;/a&gt;&lt;/h5&gt;&lt;?php
                          } else {
                              ?&gt;&lt;h5 class="post_title"&gt;&lt;?php kingler_theme_show_layout($post_data['post_title']); ?&gt;&lt;/h5&gt;&lt;?php
                          }
                          //kingler_theme_show_layout($reviews_summary);
                          if (!empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]-&gt;terms_links)) {
                              ?&gt;&lt;div class="post_info post_info_tags"&gt;&lt;?php echo join(', ', $post_data['post_terms'][$post_data['post_taxonomy_tags']]-&gt;terms_links); ?&gt;&lt;/div&gt;&lt;?php
                          }
                          ?&gt;
                      &lt;/div&gt;
                  &lt;?php } ?&gt;
              &lt;/div&gt;  &lt;!-- /.post_content --&gt;
          &lt;/&lt;?php kingler_theme_show_layout($tag); ?&gt;&gt;    &lt;!-- /.post_item --&gt;
          &lt;?php
          if ($columns &gt; 1) {
              ?&gt;&lt;/div&gt;&lt;?php
          }
      }
  }
  ?&gt;
  </code></pre>
  
  <p>Also a link to a live example if needed <a href="http://www.omni-techinfo.com/index.php/product/ad-blue-grundfos-pump/" rel="nofollow noreferrer">http://www.omni-techinfo.com/index.php/product/ad-blue-grundfos-pump/</a></p>