438 posts
  • 4 Years of Membership
  • Author Level 4
  • Collector Level 3
  • Exclusive Author
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
  • 4 Years of Membership
  • Canada
  • Collector Level 1
  • Exclusive Author
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

1368 posts
  • Copyright Ninja
  • Trendsetter
  • Weekly Top Seller
  • 5 Years of Membership
+7 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
  • 4 Years of Membership
  • Author Level 4
  • Collector Level 3
  • Exclusive Author
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.

1368 posts
  • Copyright Ninja
  • Trendsetter
  • Weekly Top Seller
  • 5 Years of Membership
+7 more
Smartik
says

Smartik are you serious?

No, I’m not. ;)

316 posts
  • Affiliate Level 2
  • Author Level 5
  • Collector Level 2
  • 4 Years of Membership
+2 more
SyamilMJ
says

add_filter(‘paginate_links’,’my_custom_function’);

function my_custom_function($link) {

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

}

590 posts
  • Weekly Top Seller
  • Elite Author
  • Author Level 8
  • Featured Author
+6 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
  • Affiliate Level 2
  • Author Level 5
  • Collector Level 2
  • 4 Years of Membership
+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.

1368 posts
  • Copyright Ninja
  • Trendsetter
  • Weekly Top Seller
  • 5 Years of Membership
+7 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
  • Weekly Top Seller
  • Elite Author
  • Author Level 8
  • Featured Author
+6 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