439 posts
  • Bought between 50 and 99 items
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Sold between 5 000 and 10 000 dollars
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
  • Bought between 1 and 9 items
  • Canada
  • Exclusive Author
  • Has been a member for 2-3 years
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

1081 posts
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
+1 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 ;)

439 posts
  • Bought between 50 and 99 items
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Sold between 5 000 and 10 000 dollars
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.

1081 posts
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
+1 more
Smartik says

Smartik are you serious?

No, I’m not. ;)

315 posts
  • Has been a member for 3-4 years
  • Sold between 10 000 and 50 000 dollars
  • Attended a Community Meetup
  • Exclusive Author
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
SyamilMJ says

add_filter(‘paginate_links’,’my_custom_function’);

function my_custom_function($link) {

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

}

590 posts
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Has been a member for 4-5 years
  • Europe
  • Exclusive Author
  • Referred between 50 and 99 users
  • Bought between 100 and 499 items
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.

315 posts
  • Has been a member for 3-4 years
  • Sold between 10 000 and 50 000 dollars
  • Attended a Community Meetup
  • Exclusive Author
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
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.

1081 posts
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
+1 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 between 100 000 and 250 000 dollars
  • Has been a member for 4-5 years
  • Europe
  • Exclusive Author
  • Referred between 50 and 99 users
  • Bought between 100 and 499 items
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