Blog post pagination

How to give page number to the blog instead of “older post” and “newer post”?

Hello there,

Thank you for reaching out to us here. In order to achieve that objective, could you please try to do the following?

  1. Install and activate the WP-PageNavi plugin
  2. Download the Sydney child theme from here, then unzip it
  3. Copy the following files from parent theme:
  • sydney/archive-employees.php
  • sydney/archive-services.php
  • sydney/archive.php
  • sydney/home.php
  • sydney/index.php
  • sydney/search.php

then paste into the child theme’s folder. Then open those files on your code editor
4. Find this line:


the_posts_navigation()

and replace it with:


wp_pagenavi()

  1. Zip the child theme, then install and activate it.

Regards,
Kharis

I cannot find the following files from the parent theme…

  • sydney-child/archive-employees.php
  • sydney-child/archive-services.php
  • sydney-child/archive.php
  • sydney-child/home.php
  • sydney-child/index.php
  • sydney-child/search.php

Do you mean the circled files in the picture?
parent theme files

I am completely a newbie of website development. I know that this is a good theme. So I used the Sydney theme for my first website development. But I don’t understand what is the difference between the child theme and the sydney theme. As I have built almost 90% of my website in my localhost, I am worrying that if I activate the child theme now, all my developments will be disappeared and I therefore need to re-build all the things. Will it happen? And the next question is do I need to re-activate the sydney theme later on after I finished the works in the child theme?

May I have some support for the above problems? Thanks!

Hello there,

Sorry for the misled. Yes, I mean these files:


* sydney/archive-employees.php
* sydney/archive-services.php
* sydney/archive.php
* sydney/home.php
* sydney/index.php
* sydney/search.php

A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme. Child themes are the recommended way of modifying an existing theme. Quoted from the WordPress codex.

You don’t have to reactivate the Sydney theme after the child theme had been activated. The settings you have done in the customizer previously would be synced automatically. If it wouldn’t, you could use the Customizer Export/Import plugin.

Regards,
Kharis

Thanks! Will test it later.
But I would like to ask why should we use the parent theme instead of using a child theme at the very beginning? Why don’t you put the child theme in the Wordpress theme market for public download?

sydney-child with copied files
cannot install

I have copied all your suggested files and pasted them into the sydney-child theme unzip file, and replaced “the_posts_navigation()” with “wp_pagenavi()” in each of the suggested files. And I have re-zip it and try to install it in wordpress. But the installation is failed. The second picture is the result of the installation. What can I do foe this?

Finally works!
But the sequence is a bit different. I installed the child theme first, and copy and paste the suggested files into the theme. Then, it works. I have the page numbers for my blog now. Thanks!
One more thing, the Customizer Export/Import plugin is useful which help me restore all of my settings. Thank you so much! You gave me a big help!

No problem. Just go easy on it. :slight_smile:

I am marking this thread as resolved. Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis

Thanks.