daily pastebin goal
45%
SHARE
TWEET

Post Nav 2

a guest Sep 19th, 2011 13 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3.  
  4.         Section: PostNav
  5.         Author: Andrew Powers
  6.         Description: Paginates posts, shows a numerical post navigation
  7.         Version: 1.0.0
  8.        
  9. */
  10.  
  11. class PageLinesPostNav2 extends PageLinesSection {
  12.  
  13.    function __construct( $registered_settings = array() ) {
  14.        
  15.                 $name = __('Post Navigation2', 'pagelines');
  16.                 $id = 'postnav';
  17.        
  18.                
  19.                 $settings = array(
  20.                         'type'                  => 'main',
  21.                         'description'   => 'Post Navigation2 - Shows titles for next and previous post.',
  22.                         'workswith'     => array('main-single', 'main-default'),
  23.                         'folder'                => 'wp',
  24.                         'init_file'     => 'postnav',
  25.                         'icon'                  => PL_ADMIN_ICONS . '/map.png'
  26.                 );
  27.                
  28.  
  29.            parent::__construct($name, $id, $settings);    
  30.    }
  31.  
  32.    function section_template() { ?>
  33.         <?php pagelines_register_hook( 'pagelines_section_before_postnav' ); // Hook ?>
  34.                 <div class="post-nav fix">
  35.                         <span class="previous"><?php previous_post_link('%link') ?></span>
  36.                         <span class="next"><?php next_post_link('%link') ?></span>
  37.                 </div>
  38.         <?php pagelines_register_hook( 'pagelines_section_after_postnav' ); // Hook ?>
  39. <?php }
  40.  
  41. }
  42.  
  43. /*
  44.         End of section class
  45. */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top