srikat

template_custom-full-width.php

Sep 5th, 2016
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <?php
  2.  
  3. /* Template Name: Example Template */
  4.  
  5. add_filter( 'genesis_attr_site-inner', 'sk_attributes_site_inner' );
  6. /**
  7. * Add attributes for site-inner element.
  8. *
  9. * @since 2.0.0
  10. *
  11. * @param array $attributes Existing attributes.
  12. *
  13. * @return array Amended attributes.
  14. */
  15. function sk_attributes_site_inner( $attributes ) {
  16.  
  17. $attributes['role'] = 'main';
  18. $attributes['itemprop'] = 'mainContentOfPage';
  19.  
  20. return $attributes;
  21.  
  22. }
  23.  
  24. // Remove div.site-inner's div.wrap
  25. add_filter( 'genesis_structural_wrap-site-inner', '__return_empty_string' );
  26.  
  27. // Display header
  28. get_header();
  29.  
  30. // Content
  31. echo 'Hello World';
  32.  
  33. // Display Footer
  34. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment