Advertisement
srikat

home.php

Apr 28th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.23 KB | None | 0 0
  1. <?php
  2.  
  3. remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
  4.  
  5. add_action( 'genesis_entry_header', 'sk_do_post_image', 4 );
  6. function sk_do_post_image() {
  7.     $image_args = array(
  8.         'size' => 'home-featured-image'
  9.     );
  10.  
  11.     echo '<div class="home-featured-image"><a href="' . get_permalink() . '">' . genesis_get_image( $image_args ) . '</a></div>';
  12.  
  13. }
  14.  
  15. add_action( 'genesis_entry_header', 'genesis_post_meta', 4 );
  16.  
  17. remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
  18.  
  19. add_filter( 'genesis_attr_entry-header', 'sk_genesis_attributes_entry_header' );
  20. /**
  21.  * Add attributes for entry header element.
  22.  *
  23.  * @param array $attributes Existing attributes.
  24.  *
  25.  * @return array Amended attributes.
  26.  */
  27. function sk_genesis_attributes_entry_header( $attributes ) {
  28.  
  29.     $attributes['class'] = 'entry-header one-half first';
  30.  
  31.     return $attributes;
  32.  
  33. }
  34.  
  35. add_filter( 'genesis_attr_entry-content', 'sk_genesis_attributes_entry_content' );
  36. /**
  37.  * Add attributes for entry content element.
  38.  *
  39.  * @param array $attributes Existing attributes.
  40.  *
  41.  * @return array Amended attributes.
  42.  */
  43. function sk_genesis_attributes_entry_content( $attributes ) {
  44.  
  45.     $attributes['class'] = 'entry-content one-half';
  46.  
  47.     return $attributes;
  48.  
  49. }
  50.  
  51. add_action( 'genesis_entry_footer', 'sk_post_info' );
  52. function sk_post_info() {
  53.     echo '<div class="one-half first">';
  54.         genesis_post_info();
  55.     echo '</div>';
  56. }
  57.  
  58. remove_filter( 'the_content', 'sharing_display', 19 );
  59. remove_filter( 'the_excerpt', 'sharing_display', 19 );
  60.  
  61. add_action( 'genesis_entry_footer', 'sk_social_sharing_buttons' );
  62. function sk_social_sharing_buttons() {
  63.     if ( function_exists( 'sharing_display' ) ) {
  64.         echo '<div class="one-half">'. sharing_display() . '</div>';
  65.     }
  66. }
  67.  
  68. //* Modify the Excerpt read more link
  69. add_filter('excerpt_more', 'new_excerpt_more');
  70. function new_excerpt_more($more) {
  71.     return '<p><a class="more-link" href="' . get_permalink() . '">Read More ยป</a></p>';
  72. }
  73.  
  74. //* Customize the entry meta in the entry footer
  75. add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
  76. function sp_post_meta_filter($post_meta) {
  77.     $post_meta = '[post_categories before="Filed Under: "] [post_tags before="| Tagged With: "]';
  78.     return $post_meta;
  79. }
  80.  
  81. genesis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement