Try it with:
echo wp_get_attachment_image( get_the_ID(), 'thumbnail' );
http://codex.ww.wp.xz.cn/Function_Reference/wp_get_attachment_image
Hello, thanks for your help.
now some images appears but not all of them, and they are not link.
http://www.1907.net/deneme/
do you have any idea?
Try setting posts_per_page to -1:
$images_query_args = array(
'post_type' => 'attachment',
'post_status' => 'inherit',
'post_mime_type' => 'image',
'posts_per_page' => -1
);
one last question, how am i going to edit css this page. how to add this page to style.css
thanks for your help
Look at the structure of your theme’s normal page.php and apply it to this custom template.
in my themes page.php i have this code:
<?php if (get_post_meta($post->ID, 'header_choice_select', true));{ get_header(get_post_meta($post->ID, 'header_choice_select', true)); } ?>
<div id="content_full" >
<?php breadcrumbs_plus(); ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php endwhile; // end of the loop. ?>
<?php get_template_part( 'loop', 'page' ); ?>
<?php SEO_pager() ?>
</div><!-- #content -->
<?php get_footer(); ?>
i added it to the template-all-images.php now page is not working all white.
Hello cinisli:
AS your question describe you want to display images attached to the posts. If images are featured images then you should use get_the_post_thumbnail($post->ID,’thumbnail’);