I have a page.tpl.php where I want to display images inside a div. So I created a custom content type called "Slider" , then I created a field called "image" where the machine_name for it is "field_image_slider".
Then I started adding contents (content->add content->Slider ..)
The problem is that I don't know how to display the images of this custom content! what is the PHP code that I should place inside page.tpl.php in order to display the fields of this custom content?
This is node.tpl.php :
<?php
print render($content['field_image_slider']);
?>
And this is page.tpl.php :
<div id="banner_slides" class="owl-carousel owl-theme">
<?php
if (!empty($node)) :
$fieldImage = field_get_items('node', $node, 'field_image_slider');
if ($fieldImage):
print '<div class="item"><figure><img src="' .file_create_url($node->field_image_slider['und'][0]['uri']). '" /></figure><h3 class="orange">Hi</h3></div>';
endif;
endif;
?>
</div>