Advertisement
jan_dembowski

functions.php

Jan 27th, 2016
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. <?php
  2.  
  3. add_action( 'wp_enqueue_scripts', 'mh_twentysixteen_child_style' , 5 );
  4.  
  5. function mh_twentysixteen_child_style() {
  6.     wp_enqueue_style( 'twentysixteen-parent-style', get_template_directory_uri() . '/style.css' );
  7. }
  8.  
  9. function twentysixteen_post_thumbnail() {
  10.     if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
  11.         return;
  12.     }
  13.  
  14.     if ( is_singular() ) :
  15.     ?>
  16.  
  17.     <div class="post-thumbnail">
  18.         <?php the_post_thumbnail('full'); ?>
  19.     </div><!-- .post-thumbnail -->
  20.  
  21.     <?php else : ?>
  22.  
  23.     <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
  24.         <?php the_post_thumbnail( 'full', array( 'alt' => the_title_attribute( 'echo=0' ) ) ); ?>
  25.     </a>
  26.  
  27.     <?php endif; // End is_singular()
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement