jetpack.php 816 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Compatibility settings and functions for Jetpack from Automattic
  4. * See jetpack.me
  5. *
  6. * @package Spun
  7. */
  8. function spun_jetpack_setup() {
  9. /**
  10. * Add theme support for Infinite Scroll.
  11. * See: http://jetpack.me/support/infinite-scroll/
  12. */
  13. add_theme_support( 'infinite-scroll', array(
  14. 'container' => 'content',
  15. 'footer' => 'page',
  16. 'render' => 'spun_infinite_scroll',
  17. 'posts_per_page' => 15,
  18. 'footer_widgets' => array( 'sidebar-1', 'sidebar-2', 'sidebar-3' ),
  19. ) );
  20. add_theme_support( 'social-links', array(
  21. 'facebook', 'twitter', 'linkedin', 'tumblr'
  22. ) );
  23. }
  24. add_action( 'after_setup_theme', 'spun_jetpack_setup' );
  25. /* Load the proper content template */
  26. function spun_infinite_scroll() {
  27. while( have_posts() ) {
  28. the_post();
  29. get_template_part( 'content', 'home' );
  30. }
  31. }