Yapmak istediğim title; resim adı | site adı
Şimdiden teşekkürler.
<?php get_header(); ?>
<div class="container">
<div class="container_content" style="background:#FFF; border:solid 1px #ddd;">
<?php wp_reset_query(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ));
foreach ( $attachments as $k => $attachment )
if ( $attachment->ID == $post->ID )
break;
$previous_image = isset( $attachments[$k - 1] ) ? $attachments[$k - 1]->ID : false;
$next_image = isset( $attachments[$k + 1] ) ? $attachments[$k + 1]->ID : false;
$next_url = isset($attachments[$k+1]) ? get_permalink($attachments[$k+1]->ID) : get_permalink($attachments[0]->ID);
$prev_url = isset($attachments[$k-1]) ? get_permalink($attachments[$k-1]->ID) : get_permalink($attachments[0]->ID);
?>
<div class="gallery-page">
<div id="galeri" class="gallery-image-title"><h2><?php echo esc_attr( get_the_title() ); ?></h2>
</div>
<div class="reklam-mobile" style="width:320px; height:100px; margin:0 auto;">
<?php echo stripslashes(get_option('md_mobile_reklam')); ?>
</div>
<div class="reklam468" style="width:468px; height:60px; margin:0 auto;">
<?php echo stripslashes(get_option('md_galeri_resimustu_reklam')); ?>
</div>
<div class="gallery-image-title-area">
<?php if ( $previous_image != "" ) { ?>
<div><a href="<?php echo $prev_url; ?>#galeri"><span class="gallery-previous"></span></a></div>
<?php } if ( $next_image == "" ) { ?>
<div><a href="<?php echo get_permalink($post->post_parent); ?>"><span class="gallery-next"></span></a></div>
<?php } else { ?>
<div><a href="<?php echo $next_url; ?>#galeri"><span class="gallery-next"></span></a></div>
<?php } ?>
<div class="clear"></div>
</div>
<div class="temiz"></div>
<div class="gallery-images">
<?php if (get_option('md_galeri_resimarasi_reklam_kontrol') == "Evet" ) {
$reklamsayi=get_option('md_galeri_resimarasi_reklam_sayi');
if( $k%$reklamsayi==0 && $k!=0) { ?>
<div id="reklami">
<div class="reklam336x280-2" style="width:336px; height:280px; margin:0 auto;">
<?php echo stripslashes(get_option('md_galeri_resimarasi_reklam')); ?>
</div>
<div class="reklami-gec">
<a href="#galeri" onclick="$('#kendisi').toggle('medium');document.getElementById('reklami').style.display = 'none';"><?php echo __('Reklamları Geç','altinoktaonalti'); ?></a>
</div>
</div>
<div id="kendisi">
<?php if ( $next_image == "" ) { ?>
<a class="desktop-img" href="<?php echo get_permalink($post->post_parent); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('680', '600')); ?></a>
<a class="mobile-img" href="<?php echo get_permalink($post->post_parent); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('300', '300')); ?></a>
<?php } else { ?>
<a class="desktop-img" href="<?php echo $next_url; ?>#galeri" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('680', '600')); ?></a>
<a class="mobile-img" href="<?php echo $next_url; ?>#galeri" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('300', '300')); ?></a>
<?php } ?>
</div>
<?php }
else {?>
<?php if ( $next_image == "" ) { ?>
<a class="desktop-img" href="<?php echo get_permalink($post->post_parent); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('680', '600')); ?></a>
<a class="mobile-img" href="<?php echo get_permalink($post->post_parent); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('300', '300')); ?></a>
<?php } else { ?>
<a class="desktop-img" href="<?php echo $next_url; ?>#galeri" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('680', '600')); ?></a>
<a class="mobile-img" href="<?php echo $next_url; ?>#galeri" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('300', '300')); ?></a>
<?php } ?>
<?php }
} else {?>
<?php if ( $next_image == "" ) { ?>
<a class="desktop-img" href="<?php echo get_permalink($post->post_parent); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('680', '600')); ?></a>
<a class="mobile-img" href="<?php echo get_permalink($post->post_parent); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('300', '300')); ?></a>
<?php } else { ?>
<a class="desktop-img" href="<?php echo $next_url; ?>#galeri" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('680', '600')); ?></a>
<a class="mobile-img" href="<?php echo $next_url; ?>#galeri" title="<?php echo esc_attr( get_the_title() ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>"><?php echo wp_get_attachment_image($post->ID, array('300', '300')); ?></a>
<?php } ?>
<?php } ?>
<div style="display:inline-block; margin:5px;">
<div class="paylas-buton facebook-paylas"><a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank"><span class="sosyal-ikon facebookf"></span><span class="paylas-yazi"></span></a></div>
<div class="paylas-buton twitter-paylas"><a href="http://twitter.com/home?status=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank"><span class="sosyal-ikon twitterf"></span><span class="paylas-yazi"></span></a></div>
<div class="paylas-buton google-paylas"><a href="https://plus.google.com/share?url=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank"><span class="sosyal-ikon gplus"></span><span class="paylas-yazi"></span></a></div>
</div>
<div class="imgaciklama">
<div class="imgaciklama_baslik"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></div>
<div class="imgaciklama_icerik"><?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?></div>
</div>
</div>
</div>
<div class="yaziya-don">
<?php echo __('Konuya geri dön','altinoktaonalti'); ?>:<a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a>
</div>
<?php endwhile; else: ?>
<?php gp_not_found(); ?>
<?php endif; ?>
<div class="yorumlar" style="width:660px; height:auto; margin-left:auto; margin-right:auto;">
<?php comments_template( '', true ); ?>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>