Advertisement
geminilabs

[site-reviews] Fix pagination in the GeneratePress theme

May 31st, 2018
602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. /**
  2.  * Override the GeneratePress function that changes the navigation template
  3.  * We do this to fix the Site Reviews ajax pagination
  4.  * Paste this in your active theme's functions.php file.
  5.  * @param string $template
  6.  * @param string $class
  7.  * @return string
  8.  */
  9. if( !function_exists( 'generate_modify_posts_pagination_template' )) {
  10.     function generate_modify_posts_pagination_template( $template, $class ) {
  11.         if( !empty( $class )
  12.             && false !== strpos( $class, 'pagination' )
  13.             && false === strpos( $class, 'glsr-' )) {
  14.             $template = '<div class="nav-links">%3$s</div>';
  15.         }
  16.         return $template;
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement