greyed code

get_template_part of my code is not showing in frontend.
I have used following syntax:

<input type="hidden" name="edit_gallery" id="edit_gallery" value="<?php echo isset($edit_gallery) ? esc_attr($edit_gallery) : ''; ?>">
 <?php get_template_part('templates/gallery_upload'); ?>

In gallery_upload file i have following syntax:

 * @package WordPress
 * @subpackage Reales

$reales_general_settings = get_option('reales_general_settings');
$max_files               = isset($reales_general_settings['reales_max_files_field']) ? $reales_general_settings['reales_max_files_field'] : 10;

<div class="submit_container">
    <div class="submit_container_header"><?php esc_html_e('Image Gallery', 'reales');?> <span class="text-red">*</span></div>
    <div id="upload-container">
        <div id="aaiu-upload-container" style="position: relative;">
            <div id="aaiu-upload-imagelist"></div>
            <div id="imagelist" class="ui-sortable"></div>
            <div class="clearfix"></div>
            <a href="javascript:void(0);" id="aaiu-uploader" class="btn btn-o btn-default" style="position: relative; z-index: 1;"><span class="glyphicon glyphicon-folder-open"></span>&nbsp;&nbsp;&nbsp;Browse Images</a>
            <input name="new_gallery" id="new_gallery" type="hidden">
        <div id="html5_1bgg0v0901o9u7ib1ciqj3213tf3_container" class="moxie-shim moxie-shim-html5" style="position: absolute; top: 0px; left: 0px; width: 145px; height: 37px; overflow: hidden; z-index: 0;"><input id="html5_1bgg0v0901o9u7ib1ciqj3213tf3" style="font-size: 999px; opacity: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;" multiple="" accept="image/jpeg,image/gif,image/png" type="file"></div></div>
    <p class="help-block"><?php esc_html_e('Maximum number of files:', 'reales'); ?> <strong><?php echo esc_html($max_files); ?></strong></p>

But it doesn’t show up in my page.
When i inspected i found the this part of my code greyed out like attached picture:

Can anyone help e what’s wrong in my code?

Read more here: get_template_part grayed out while inspecting


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: