Advertisement
Guest User

part.php

a guest
Feb 26th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.45 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The default template for displaying content. Used for both single and index/archive/search.
  4.  *
  5.  * @package WordPress
  6.  * @subpackage vilan
  7.  */
  8. ?>
  9.  
  10. <?php
  11. global $blog_img_width, $blog_img_height;
  12. $content = get_the_content();
  13. $has_pt = '';
  14. if ( gg_is_in_vc() ) {
  15.     $blog_img_width = '540';
  16.     $blog_img_height = '360';
  17. }
  18. wp_enqueue_script('magnific');
  19. wp_enqueue_style('magnific');
  20. ?>
  21.  
  22. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  23.     <?php
  24.     if ( has_post_thumbnail() && get_theme_mod('blog_inner_image', 1) == 1) {
  25.         $thumbnail_id = get_post_thumbnail_id( $post->ID );
  26.         $full_image_url = wp_get_attachment_image_src( $thumbnail_id, 'full' );
  27.         $img_src = gg_aq_resize( $thumbnail_id, $blog_img_width, $blog_img_height, true, true );
  28.         $has_pt = 'has-post-thumbnail';
  29.     ?>
  30.     <figure class="effect-sadie">
  31.         <img class="wp-post-image" src="<?php echo esc_url($img_src); ?>" alt="<?php echo get_the_title( $thumbnail_id ); ?>" />
  32.         <figcaption>
  33.             <a class="link-wrapper" href="<?php the_permalink(); ?>"></a>
  34.         </figcaption>
  35.     </figure>
  36.     <?php } ?>
  37.  
  38.     <div class="article-wrapper <?php echo $has_pt; ?>">
  39.         <header class="entry-header">
  40.             <div class="article-header-body <?php if(trim($content) == "") echo 'no-border'; ?>">
  41.                 <h2 class="entry-title">
  42.                     <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'okthemes' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
  43.                 </h2>
  44.                 <p class="meta"><?php echo vilan_posted_on();?></p>
  45.             </div>
  46.         </header><!-- .entry-header -->
  47.  
  48.         <?php if ( is_search() ) : ?>
  49.         <div class="entry-summary">
  50.             <?php the_excerpt(); ?>
  51.         </div><!-- .entry-summary -->
  52.  
  53.         <?php elseif ( gg_is_in_vc() ) : ?>
  54.             <!-- do not display anything -->
  55.         <?php else : ?>
  56.             <?php if(trim($content) != "") : ?>
  57.                 <div class="entry-content">
  58.                     <?php the_content( __( 'Continue reading', 'okthemes' ) ); ?>
  59.                     <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'okthemes' ), 'after' => '</div>' ) ); ?>
  60.                 </div><!-- .entry-content -->
  61.             <?php endif; ?>
  62.         <?php endif; ?>
  63.  
  64.         <?php if ( !gg_is_in_vc() ) : ?>
  65.         <footer class="entry-meta">
  66.             <?php echo vilan_posted_in();?>
  67.             <?php edit_post_link( __( 'Edit', 'okthemes' ), '<span class="edit-link">', '</span>' ); ?>
  68.         </footer><!-- .entry-meta -->
  69.         <?php endif; ?>
  70.     </div><!-- .article-wrapper -->
  71. </article><!-- #post -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement