内容(); 不在自定义模板中工作

I'm trying to show the_content() in a related template file. It is working in 2 almost similar coded templates files. But if I use it in this template the page will not even load.

The code with the_content();

if( $eddrd_query->have_posts() && $go  ) { ?>
            <div id="layero-related-downloads">
                <h3><?php echo $related_dl_title; ?></h3>
                <div id="edd-related-items-wrapper" class="edd-rp-single">
                    <?php $countRow = 1; // Editted: for creating 3 item rows
                    while ($eddrd_query->have_posts()) {
                            $eddrd_query->the_post();
                            if ($post->ID == $exclude_post_id) continue;

                            if ($countRow%3 == 1) { // Editted: for creating 3 item rows
                                echo "<div class='row'>";
                            }   ?>
                                <div class="col-md-4">
                                    <div class="edd_download_inner">
                                     <?php the_content(); ?>
                                        <div class="thumb">
                                            <?php
                                            $thumbID=get_post_thumbnail_id(get_the_ID());
                                            $featImage=wp_get_attachment_image_src($thumbID,'olam-product-thumb');
                                            $featImage=$featImage[0]; 
                                            $alt = get_post_meta($thumbID, '_wp_attachment_image_alt', true);

                                            $square_img = get_post_meta(get_the_ID(),"download_item_square_img");

                                        // feat vid code start

Any idea?

You can do these things if you didn't do yet.

First set the template as a template file. For that include these lines above all codes in template file.

<?php
/*
 * Template Name: myTemplate
 */

After that make the template selected from the post editing right sidebar panel in wordpress.

Make sure U have defined define( 'WP_DEBUG', true ); in wp-config file.

Thanks