Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // File Security Check
- if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) :
- die ( 'You do not have sufficient permissions to access this page!' );
- endif;
- get_header(); ?>
- <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
- <h1><?php the_title(); ?></h1>
- <h4><?php echo get_the_term_list( get_the_ID(), 'portfolio-category', '<span class="portfolio-categories">' . __( 'Filed Under', 'nicethemes' ) . ': ', ', ', '</span><!--/.portfolio-categories-->' . "\n" ); ?></h4>
- <?php
- $embed = get_post_meta( get_the_ID(), 'embed', true );
- $attachments = get_children( array( 'post_parent' => get_the_ID(),
- 'post_type' => 'attachment',
- 'post_mime_type' => 'image',
- 'order' => 'DESC',
- 'orderby' => 'menu_order date')
- );
- if ( has_post_thumbnail() || ! empty( $attachments ) || ( $embed <> '' ) ) { ?>
- <div class="featured-image clearfix">
- <?php
- if ( $embed <> '' ) {
- echo nice_embed( array ( 'id' => get_the_ID(), 'width' => 620 ) );
- } elseif ( ! empty( $attachments ) && ( count( $attachments ) > 1) ) {
- ?>
- <div style="width:630px; margin:0 auto; position:relative;" class="clearfix">
- <div id="slides" data-speed="12000" data-loader="<?php echo get_template_directory_uri(); ?>/images/ajax-loader.gif" class="slider clearfix">
- <!-- BEGIN .slides_container -->
- <div class="slides_container">
- <?php foreach ( $attachments as $att_id => $attachment ) { ?>
- <div class="slide">
- <?php nice_image( array( 'width' => 620, 'height' => 265, 'class' => 'wp-post-image', 'id' => $att_id ) ); ?>
- </div>
- <?
- } // endforeach
- ?>
- <!-- END .slides_container -->
- </div>
- <!-- END #slides -->
- </div>
- <?php
- } elseif ( ! empty( $attachments ) || has_post_thumbnail() ){
- nice_image( array( 'width' => 620, 'height' => 265, 'class' => 'wp-post-image' ) );
- }
- ?>
- </div>
- </div>
- <?php
- }
- ?>
- <div id="content" <?php post_class(); ?>>
- <div class="post">
- <?php the_content(); ?>
- <?php
- $testimonial = get_post_meta( get_the_ID(), 'testimonial', true );
- $testimonial_author = get_post_meta( get_the_ID(), 'testimonial_author', true );
- $url = get_post_meta( get_the_ID(), 'url', true);
- echo '<div>' . "\n";
- if ( $testimonial != '' ) { echo '<blockquote>' . $testimonial . "\n"; } // End IF Statement
- if ( $testimonial_author != '' ) {
- echo '<cite>' . $testimonial_author . "\n";
- if ( $url != '' ) { echo ' — <a href="' . $url . '">' . $url . '</a>' . "\n"; }
- echo '</cite>' . "\n";
- } // End IF Statement
- if ( $testimonial != '' ) { echo '</blockquote>' . "\n"; }
- echo '</div><!--/#extras-->' . "\n";
- ?>
- <div class="post-entries">
- <div class="nav-prev fl"><?php previous_post_link( '%link', '<span class="meta-nav">←</span> ' . __( 'Previous', 'nicethemes' ) ); ?></div>
- <div class="nav-next fr"><?php next_post_link( '%link', __( 'Next', 'nicethemes' ) . ' <span class="meta-nav">→</span>' ); ?></div>
- <div class="fix"></div>
- </div><!-- #post-entries -->
- </div>
- <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'nicethemes' ), 'after' => '</div>' ) ); ?>
- </div>
- <!-- END #content -->
- <?php endwhile; // end of the loop. ?>
- <hr class="hidden" />
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement