Add pagination to blog

Add the first block of code in functions.php your topic WordPress and add my_paginate_links() instead of, your topic, where to display navigation. After adding the code, the pagination will appear in the right place.

In addition, you can always use the plugin WP-PageNavi to add pagination and plugin WP PageNavi Style for numbering.

Bonus code

On the row with the code, which we examined, I decided to add one more which is the code. This code is too short, to put it in a separate article, but also too good, to forget about him. The code will definitely come in handy.
Before, I would do the count of published articles through a database query, this would work well. On the other hand, now I want to show you how to make this task easier.. Consider the standard code for displaying the number of published articles on the blog.

That's all, I checked all codes, and it remains only to wish good luck in the development of sites.


Купить хостинг WordPress
WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

2 Responses

  1. Yuri says:

    Nice in the end you get it. I did the numbering with a plug-in and I don’t really like it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal