Topic: Customize Attachment.php
hello....
i use the arras 1.5.0.1 on my website and i have many picture on the post.
In this theme there is attachment.php run with general work. I look on the wordpress defalut theme (twentyten) that the attachment.php can work nice. Then i tried with customize attachment.php from extatix on otectom Post
in the end, i customize again with my version.
Here is :
<!-- re-code by sinug -->
<?php get_header(); ?>
<!-- 970px layout -->
<div id="content1" class="section" align="center">
<!--end-->
<?php arras_above_content() ?>
<?php if (have_posts()) : the_post(); ?>
<?php arras_above_post() ?>
<!-- back to the post -->
<h2><p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'arras' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
/* translators: %s - title of parent post */
printf( __( '<span class="meta-nav">←</span> %s', 'arras' ), get_the_title( $post->post_parent ) );
?></a></p></h2>
<!--end-->
<div id="post-<?php the_ID() ?>" <?php arras_single_post_class() ?>>
<div class="entry-content single-post-attachment clearfix">
<?php $attachment_size = apply_filters( 'arras_attachment_size', 900 );
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); ?>
</a>
<?php wp_link_pages(array('before' => __('<p><strong>Pages:</strong> ', 'arras'),
'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<!-- image description -->
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'arras' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'arras' ), 'after' => '</div>' ) ); ?>
<!--end-->
<!-- navigation with image -->
<div class="navigation clearfix">
<div class="floatleft"><?php previous_image_link( true ); ?></div>
<div class="floatright"><?php next_image_link( true ); ?></div>
</div><!-- #nav-below -->
<!--end-->
<?php else: ?>
<?php arras_post_notfound() ?>
<?php endif; ?>
<?php arras_below_content() ?>
</div><!-- #content -->note : for <div id="content1" class="section" align="center">
You must edit the 2c-r-fixed.css on the yourcpanle\wp-content\themes\arras\css\layouts
add the :
#content1 {
margin:0;
width:970px;
overflow:hidden;
}and save
this script work nice in my website OpenOnia.Com/posting and attachment.php preview
regards ![]()
Last edited by sinug (2011-01-30 03:09:19)