Advertisement
brasofilo

WPSE_57654_debug

Jul 10th, 2012
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2. function my_theme_navigation_debug()
  3. {
  4.     global $shortname;
  5.  
  6.     echo 'This is the Option Value: ' . get_option( $shortname . '_next_prev_or_paginate' );
  7.  
  8.     echo '<br /><br />This is the Previous Link: ';
  9.         previous_posts_link ('Newer');
  10.  
  11.     echo '<br /><br />This is the Next Link: ';
  12.         next_posts_link('Older');
  13.  
  14.     global $wp_query;
  15.     $big = 999999999;      
  16.     echo '<br /><br />These are the Paginated Links: ';
  17.         echo paginate_links( array(
  18.             'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
  19.             'format' => '?paged=%#%',
  20.             'current' => max( 1, get_query_var('paged') ),
  21.             'total' => $wp_query->max_num_pages
  22.             )
  23.         );
  24. }
  25. my_theme_navigation_debug();
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement