Advertisement
srikat

Untitled

Jan 6th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. add_action( 'genesis_entry_content', 'sk_opening_image_wrap', 7 );
  2. add_action( 'genesis_entry_content', 'sk_closing_image_wrap', 9 );
  3.  
  4. function sk_opening_image_wrap() { 
  5.     if ( has_post_thumbnail() && ( is_home() || is_archive() || is_search() ) ) {
  6.         echo '<div class="one-third first">';  
  7.     }  
  8. }
  9.  
  10. function sk_closing_image_wrap() {
  11.     if ( has_post_thumbnail() && ( is_home() || is_archive() || is_search() ) ) {
  12.         echo '</div>';
  13.     }  
  14. }
  15.  
  16. add_action( 'genesis_entry_content', 'sk_post_content_opening', 9 );
  17. add_action( 'genesis_entry_content', 'sk_post_content_closing', 11 );
  18.  
  19. function sk_post_content_opening() {   
  20.     if ( has_post_thumbnail() && ( is_home() || is_archive() || is_search() ) ) {
  21.         echo '<div class="two-thirds">';
  22.     }
  23. }
  24.  
  25. function sk_post_content_closing() {   
  26.     if ( has_post_thumbnail() && ( is_home() || is_archive() || is_search() ) ) {
  27.         echo '</div>';
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement