Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. //* Add Logo Responsive Genesis Child Theme
  2. add_filter( 'genesis_seo_title', 'abte_header_inline_logo', 10, 3 );
  3. function abte_header_inline_logo( $title, $inside, $wrap ) {
  4.  
  5. $logo = '<img src="' . get_stylesheet_directory_uri() . '/images/logo.png" width="360" height="80" alt="' . esc_attr( get_bloginfo( 'name' ) ) . '">';
  6.  
  7. $inside = sprintf( '<a href="%s" title="%s">%s</a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), $logo );
  8.  
  9. //* Determine which wrapping tags to use - changed is_home to is_front_page to fix Genesis bug
  10. $wrap = is_front_page() && 'title' === genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : 'p';
  11.  
  12. //* A little fallback, in case an SEO plugin is active - changed is_home to is_front_page to fix Genesis bug
  13. $wrap = is_front_page() && ! genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : $wrap;
  14.  
  15. //* And finally, $wrap in h1 if HTML5 & semantic headings enabled
  16. $wrap = genesis_html5() && genesis_get_seo_option( 'semantic_headings' ) ? 'h1' : $wrap;
  17.  
  18. return sprintf( '<%1$s %2$s>%3$s</%1$s>', $wrap, genesis_attr( 'site-title' ), $inside );
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement