WP Paging
2010-01-16 @ 14:47Många idag har svårt att betala sina räkningar. Då kan en lösning vara att låna pengar gratis. Ja, du hörde rätt, det är möjligt att göra det första gången. Företagen knyter på så sätt till sig kunder och du slipper ränta och andra avgifter.
The problem
WordPress has no built in paging function with numbers for themes. It’s good for users to know how many posts there are and even go to the last one. It’s good for SEO as well.
The plugin
Unlike many other page navigation plugins, this one is based on a core page number function called paginate_links. WordPress use this function for the page numbers in wp-admin. If it’s good enough to use in WordPress core, it’s good enough for everyone else, right?
There are no paging themes (like WP Page Numbers). Instead you can modify the current style in many ways.
In short
- Birth date: 2009-08-26
- Last updated: 2009-08-28
- Version: 1.2
- Tested with:
- WordPress: 2.8.4
- WordPress MU: 2.8.4 + Buddypress (Thanks to Joe Mark for testing)
- Requirements: PHP5
Download
- Download from: devdevote.com
- Download from: wordpress.org (coming soon)
Options
There are only one theme, but you can change that theme in many ways (about 155 520 possible combinations).
- Live preview – Click on the page numbers to try it out, right from the admin.
- Texts – Change all the texts except for the numbers. They will still be numbers.
- Layout – Change positions and how to display the page numbers.
- Positions – Change positions of page info and the whole paging navigator, align center included.
- Side numbers – Change the number count on the sides.
- Colors – Change colors of background, current background and behind text.
- CSS3 – You can even add gradients and round corners for those who use modern browsers. Internet Explorer is not one of them.
- Enable style – You can disable styles if you want to add an own style in your theme instead.
- Delete settings – If you for some reason need to install this plugin you can delete the saved settings.
Screenshots
The admin settings.
Installation
- Upload the FOLDER ‘wp-paging’ to /wp-content/plugins/ folder.
- Activate the plugin ‘WP Paging’ through the ‘Plugins’ menu in admin.
- Add <?php wp_paging(); ?> to your theme, after the loop or between the endwhile and else.
- Done!
Go to ‘Settings’ and then ‘WP Paging’ to change your settings.
Changelog
- 2009-08-28
- 1.2 – Error reporting where turned on. Now it’s turned off, like it should.
- 2009-08-27
- 1.1 – Bugfix – The first number now link to the right place.
- 2009-08-26
- 1.0 – Initial release.
Known issues
- ”expecting T_OLD_FUNCTION or T_FUNCTION”. I still believe this issue occur because the use of an old PHP version.
- Version number is wrong. It says 1.0 even on this version.
Possible future features
- Use Ajax for the live preview.
- Add multiple saved styles. This can be used for different styles in different categories for examples.
- Language support with MO / PO-files.
- single.php support.
Advanced
If you are an advanced user, this might interest you, if not, never mind.
Own styles and CSS
To create an own style, uncheck ”Enable styles” (above) and add your own CSS to your styles.css into your themes folder.
CSS Classes
<ul class="page-numbers"> <li><a class="page-numbers" href="[url]">[page]</a></li> <li><span class="page-numbers current">[current page]</span></li> <li><span class="page-numbers dots">[separator]</span></li> </ul>
Some extra classes are added to the UL element to change its style, but only if ”Enable styles” is checked.
Custom arguments
You can override the default values as well as the settings, by adding arguments with the function, when adding it to your theme.
$args = array( 'base' => add_query_arg( 'paged', '%#%' ), 'total' => $wp_query->max_num_pages, 'current' => $page, 'prev_next' => false, 'prev_text' => 'Prev', 'next_text' => 'Next', 'end_size' => 1, 'mid_size' => 2, 'show_all' => false, 'type' => 'list', 'behind_color' => 'dark', 'page_bkg' => 'bright', 'current_page_bkg' => 'cyan', 'enable_rounded' => true, 'alignment' => 'left', 'enable_gradients' => true, 'separator_text' => '...' );
Example
<?php echo wp_paging('show_all=true&page_bkg=dark'); ?>
Problems with 404 pages (too many page numbers)
Many people seems to have problems with 404 pages with the paging plugins out there. The problem occurs when themes are using an own WP Query object for the loop. WP Paging is clever enough to accept the parameter ”total” where you can set how many pages there are.
Look for this
$my_own_query = new WP_Query();
Remember the string of your theme (like $my_own_query).
Replace
wp_paging();
with
wp_paging('total='.$my_own_query->max_num_pages);
Change the string $my_own_query to the string of your theme.
Contribute
- Report bugs.
- Be specific.
- Tell me your WP version.
- What did you do?
- What is your guess?
- Do you have a fix?
- Spread the word. Write about WP Paging, link to this site and so on.
- Add a comment with a link to your website where WP Paging is installed. It’s nice to see how people are use it.
2011-01-22 @ 6:41 f m
Good and great beautiful plugin
refer
Add to your theme, after the loop or between the endwhile and else.
i don’t know what file , can i put this code on it.
index.php right!
2011-02-03 @ 10:02 f m
this plugine is best for page number …
tanQ
2011-02-08 @ 9:44 e m
Hi,
This is a very good plugin, I’d like to use this, though I’m kinda bit slow on this. How do I use this after placing on the right place? I wanted this to work only on a specific category in wp. And after placing the code after the endwhile it shows numbers more than the posts I have and clicking on the number doesn’t do anything but kept showing the same post. Can anybody help?
Many Thanks!
2011-02-09 @ 1:29 e m
[…] WP-Paging Mit diesen Plugin lässt sich kinderleicht eine tolle Seitenanzeige […]
2011-02-10 @ 11:49 f m
10x for the plugin, really awsome.
i xanr to get rid of this ” [separator] ”
how can i do it?
2011-02-10 @ 11:50 f m
ok, not showing, it’s the bullet separator
”page-numbers dots”>
2011-02-11 @ 11:02 f m
Wow! This one is sweet!
Totally easy for newbies to customize the design and language, and flexible enough for pros to change the style.
Just perfect!
2011-02-24 @ 12:57 f m
I have a problem!
My theme is twenty ten, i have tried to paste:
in every *.php file after the loop or befeor and after
endwhile but nothing happened!
Can somebody tell me where is my mistake … where to paste this code and rune this plug-in
Regards
2011-02-24 @ 7:19 e m
greate plug in! i have tryied several times to install it but it didn`t work! i paste the required code in diferent *.php documents like index.php, page.php, author.php, header.php …. and still nothing!
My theme is twenty ten … pleas help
2011-02-28 @ 6:17 f m
i am using this plug in in my current working site.
Its working very fine in mozilla not working in IE
Plz send any solution for that
woking:
http://teluguone.com/vinodam/?category_name=cartoons
but when i click the next page like :
http://teluguone.com/vinodam/?category_name=cartoons&paged=2
in IE
displays only back gorund color.
Plz send any solution for this
ThanQ
2011-03-03 @ 1:51 f m
Hello, I own a web business and am using your wonderful plug-in. Can you please tell me how to get it to appear on every blog page, as it only seems to show up on the main blog.
I have a number of different blog posting by categories.
Also, how do you center the whole page id’s ?
It has been installed fine and works well. I would appreciate your reply asap.
Many thanks.
2011-03-13 @ 1:31 f m
I have the same issue as @world. I am using he twentyten theme and have tried placing the ”” after the loop and between the endwhile and else in a single.php post template file. it is not working… doesn’t even appear. please help!
2011-03-15 @ 7:10 e m
Itsnt it strange thing that they didnt even included blog paging in wordpress?
I dont knwo why its getting popular…!
2011-04-07 @ 4:59 e m
this is great plugin.it’s working on index and category page .but i m using on page.php then it’s not working, always show fist 10 post where as in url ?page=2 show
any solution for this.
2011-06-10 @ 12:19 e m
In WordPress, Page navigation is so popular. we use it as default or plugin. it works nice, but sometime we face problem when we use query_posts() for selected category post.
i hope this is a solution for them.
I found this solution working fine, check this : URL:
http://raiseitsolutions.com/forum
2011-07-05 @ 1:26 e m
Hello
Your plugin is excellemt.
I just need for a method thtat numbering starts not on 1 but from a different number related to the erticle.
Is this possible?
2011-09-09 @ 12:55 e m
[…] WP Paging http://www.devdevote.com/cms/wordpress-plugins/wp-paging/ […]
2011-10-08 @ 7:44 e m
[…] WP Paging – Post Page Plugin ini menyenaraikan kiriman entri atau artikel anda dalam bentuk page bagi menjimatkan ruang […]
2011-10-17 @ 6:18 e m
Does your plugin work also for paginating the results of a search made with relevanssi?
2011-11-03 @ 12:58 f m
Just what i have been looking for, but…
I can not figure out where to put the code in the headway theme – which is what i am using. If you could help it would be greatly appreciated.
2012-01-06 @ 6:32 e m
[…] auch sehr eingeschränkt. Daher hatte ich auch bis jetzt dazu ein WordPress Plugin namens WP-Paging im […]
2012-02-16 @ 1:19 e m
For 404 problem go to Setting – Reading and change Blog pages show at most to 1 posts.
This really gave me a big headache. Don’t know if this is the proper solution.
2012-03-01 @ 7:50 e m
Do you know how we can make it for pages (not post pages)? for example; I have a lot pf products but people don’t want to scroll down forever, so how do I seperate it out and make it into multiple pages?
2012-03-09 @ 10:04 f m
Hey there. Thanks for this awesome plugin. But I have a problem. It displays the first page fine with 10 posts as I specified it. But when I click page two it displays ALL posts on one page and not the next 10 posts? How do I fix this? This is my code:
have_posts()){
$latestposts_no = get_option(‘designpile_latest_posts’);
if($latestposts_no != null){
$posts_query = new WP_Query($query_string.’posts_per_page=’.$latestposts_no);
}else{
$posts_query = new WP_Query($query_string.’&posts_per_page=6&paged=’.$paged);
}
}
$odd_or_even = ‘odd’; ?>
have_posts()) : while ($posts_query -> have_posts()) : $posts_query -> the_post(); ?>
<div class="homePost ”>
2012-03-31 @ 3:35 e m
[…] default Older Entries / Newer… jaxov.com/…/10/how-to-add-page-numbers-to… WP Paging – Page numbers / navigation plugin for … Unlike many other page navigation plugins, this one is based on a core page number function called […]
2012-05-06 @ 2:14 e m
Thank you for this amazing plugin. Certainly one of the best in WordPress, both, usability and quality.
2012-08-30 @ 11:39 f m
I have some urls on a page and I want to implement paging on it. How can I do that?
get_results(”SELECT * FROM wp_socialboomarking;”);
echo ”;
echo ‘Social Bookmarking Sites’;
foreach($query as $post){
echo ””;
echo ”.$post->socialbookmarking_url.”;
echo ””;
}
echo ””;
?>
on this data I want to use paging.
2012-10-26 @ 7:37 e m
Thanks for sharing this plugin, but also let me know if WP Paging is good or pagenavi good ?
2012-11-30 @ 7:13 f m
Thank you for nice plugin.But there is one problem.I want to see 5 post i.e Can you suggest me how we change the number of records in a page to show?
2013-02-12 @ 1:27 e m
[…] WordPress page number download sitesinden indirmemiz gerekiyor, daha sonra Plugins/ yeni menüsünden eklentimizi […]