438 posts
  • Has been part of the Envato Community for over 3 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
Pixelous
says

Hi, I am using this function for pagination – http://codex.wordpress.org/Function_Reference/paginate_links#Default_Usage The problem is there a way to customize it? What I mean, is there a way to add for the pagination links?

5 posts
  • Has been part of the Envato Community for over 3 years
  • Located in Canada
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
marcgenesis
says

You might need to clarify your question a bit but…

You can customize the pagination using the different arguments. For example, by giving the arguments ‘prev_text’ and ‘next_text’ to the paginate_links function like so :

<?php echo paginate_links( array( 'prev_text' => 'Previous page', 'next_text' => 'Next page' ) ); ?>

You will customize the previous page and next page text. If you look at the codex you will see what the other arguments do. The code above will generate something like this:

Previous page 4 5 6 7 8 Next page

1352 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says

First TF power elite author made this: http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin

You must give it a try ;)

438 posts
  • Has been part of the Envato Community for over 3 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
Pixelous
says

Smartik are you serious? There is a default WP function to do this – http://codex.wordpress.org/Function_Reference/paginate_links#Default_Usage that I have already mentioned before. I am asking how could I add a spans to the links.

1352 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says

Smartik are you serious?

No, I’m not. ;)

316 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+2 more
SyamilMJ
says

add_filter(‘paginate_links’,’my_custom_function’);

function my_custom_function($link) {

return ’<span>’.$link.’</span>’;

}

590 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
  • Sells items exclusively on Envato Market
+5 more
CodeSwift
says

Smartik are you serious? There is a default WP function to do this – http://codex.wordpress.org/Function_Reference/paginate_links#Default_Usage that I have already mentioned before. I am asking how could I add a spans to the links.

Yeah, shame on him for giving you a link to a more advanced and easier to modify pagination. @Smartik you should be ashamed.

316 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+2 more
SyamilMJ
says

Yeah, paginate_links has many shortcomings when compared to Kriesi’s pagination function. There are good reasons why theme authors still prefer kriesi’s pagination. The paginate links function was not updated since wp 2.0. It’s very limited.

1352 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says

Why? Because I like kriesi pagination? And to be honest I did not know that it’s a default option available, and so far I have worked only with kriesi pagination and wp-pagenavi. + a lot of authors from TF use those scripts. Do not judge me. ;)



Smartik are you serious? There is a default WP function to do this – http://codex.wordpress.org/Function_Reference/paginate_links#Default_Usage that I have already mentioned before. I am asking how could I add a spans to the links.
Yeah, shame on him for giving you a link to a more advanced and easier to modify pagination. @Smartik you should be ashamed.
590 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
  • Sells items exclusively on Envato Market
+5 more
CodeSwift
says

English isn’t your first language, is it? Kriesi’s pagination rules, we use it in all our themes.


Why? Because I like kriesi pagination? And to be honest I did not know that it’s a default option available, and so far I have worked only with kriesi pagination and wp-pagenavi. + a lot of authors from TF use those scripts. Do not judge me. ;)


Smartik are you serious? There is a default WP function to do this – http://codex.wordpress.org/Function_Reference/paginate_links#Default_Usage that I have already mentioned before. I am asking how could I add a spans to the links.
Yeah, shame on him for giving you a link to a more advanced and easier to modify pagination. @Smartik you should be ashamed.
by
by
by
by
by
by