Post navigation on blog index page


#1

Hello,

I would like to have post navigation links like [1 2 3 …21]. I already installed the WP PostNavi plugin and two others as well but none will work. I keep seeing the older and newer posts links on the blog index page.

Any assistance would be appreciated.
Thanks.


#2

Hello there,

Thank you for reporting.

Could you please post the plugin URL here so I can test it on my end? Please post your site URL as well.

Warmest regards,
Kharis


#3

Hi Kharis,

Thanks for your reply.
The site URL where of the blog index is: http://eye-site-testing.com/nieuws/
Here is the plugin URL: https://wordpress.org/plugins/wp-pagenavi/

Thanks


#4

Hello there,

Thank you for the links. They helped me a lot.

To display the WP-PageNavi numbered pagination, you should need to replace the default post navigation template tag into <?php wp_pagenavi(); ?>. You should pass it in the child theme mode.

  1. Install and activate the Sydney child theme
  2. Copy the following files from parent theme’s folder into the child theme’s
* archive-employees.php
* archive-services.php
* archive.php
* home.php
* index.php
* search.php

So you should have something like the following

* 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
  1. Open those files in your code editor. Then find this code the_posts_navigation() and replace it into wp_pagenavi()

  2. Save changes. Then upload through FTP or cPanel

Let me know how it goes. I’ll wait to hear back from you regarding your stats.

Warmest regards,
Kharis


#5

Hi Kharis,

I’ve carried out what you suggested but it still won’t work. BTW the home.php doesn’t have the ‘the_posts_navigation()’ in its code.


#6

Hello there,

Thank you for reporting.

What’s version of Sydney Pro you are currently using?

Warmest regards,
Kharis


#7

I’m using Sydney Pro version 1.27


#8

Hello there,

I thought we have something different.

Could you please try to open the home.php file, then find the following code block?

<div class="posts-layout">
	<?php while ( have_posts() ) : the_post(); ?>

		<?php
			get_template_part( 'content', get_post_format() );
		?>

	<?php endwhile; ?>
</div>

Insert the <?php wp_pagenavi(); ?> template tag right after the DIV.posts-layout closing tag. So you should have something like the following.

<div class="posts-layout">
	<?php while ( have_posts() ) : the_post(); ?>

		<?php
			get_template_part( 'content', get_post_format() );
		?>

	<?php endwhile; ?>
</div>
<?php wp_pagenavi(); ?>

Let me know how it goes.

Warmest regards,
Kharis


#9

Hi Kharis,

It’s still the same.


#10

Hello there,

Thank you for reporting.

I would be happy to take care of this for you.

If you don’t mind, could you please give me a temporary access to your site admin area? Send the login credentials to my email kharisblank at gmail dotcom

Warmest regards,
Kharis


#11

I thought I did misleading in my previous reply. I noticed that your current child theme folder name is sydney-pro-ii-child.

I thought I did misleading in my previous reply. Please do this in the sydney-pro-ii-child folder. So, you should have something like the following.

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

Warmest regards,
Kharis