I got thise code in the index.php
index.php
<?php
$images =& get_children( 'post_type=attachment&post_mime_type=image' );
if ( empty($images) ) {
// no attachments here
} else {
$count =0;
foreach ( $images as $attachment_id => $attachment ) {
$img_title = $attachment->post_title;
if($count == 4){
echo '</div></div><div style="position: relative; width: 650px; height: 160px; text-align: center;" class="jFlowSlideContainer"><div>';
$count =0;
}
echo wp_get_attachment_link($attachment_id, $size='thumbnail', $permalink = true);
$count ++;
}
}
?>
As you can see the attachment is opened up (with fancybox) in the single.php with this code:
single.php
<html>
<head>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style2.css" type="text/css" media="screen" />
</head>
<body>
<div style="align: center;text-align: center;">
<h2>Kollektion vom <?php the_time('d.m.Y'); ?></h2>
<h4>Artikelnummer: <?php the_title(); ?></h4>
<?php echo wp_get_attachment_image( $attachment_id, 'medium' ); ?>
<br />
<img src="<?php bloginfo('template_directory'); ?>/images/logo2.jpg">
</div>
</body>
</html>
But i only can see <?php the_time(‘d.m.Y’); ?> and <?php the_title(); ?> when i’m logged in as an admin. How can I grant acess to this site/attachment to all user?