Missing Pagination?

Upgraded my site from X to Pro, and changed from Renew to Ethos.

Now I don’t have any pagination (series of numbered links) at the bottom of the page.
I do have the next/prev buttons.

I looked at the ethos X demos and didn’t see any pagination, and I can’t find the code for the pagination in the PRO files.

Can you tell me how to add pagination to the bottom of my category pages and home page (where all posts are listed)?

I can style it … I just can’t figure out where the code is!

Thanks -

Hi There,

Thanks for writing in!

If you have activated filterable index, Ethos’ Filterable Index feature does not have pagination. You need to disable it to display the regular blog listings with pagination. This is because the Filterable Index was designed to highlight specific categories as you can see in our Ethos 1 demo http://demo.theme.co/ethos-1/2. At the bottom of the list of posts, it shows a link to the category archive page and in the archive page, the pagination is available.

Please disable filterable index to see the pagination. Pro -> theme option -> Ethos -> Blog option

Hope this clear.

Thanks

The Filterable Index was already off.

I tried turning it on and off, but that didn’t resolve anything. But still no pagination.

My blog has been in existence for years with several hundred posts. I need a way for people to paginate though through the except lists (all or by category).

The Renew theme has pages numbered and a link to each at the bottom - I’d prefer something simlar to that rather than just an " >" link icon to the next set of excerpts.

If it supposed to be showing by default if the Filterable Index is off, then I have an issue (maybe resulting from upgrading from X to PRO and changing to Ethos?)

Any direction appreciated.

How do I upload secure login information if needed? (and what do you need?)


On a side-note, the link you provided didn’t work, but http://demo.theme.co/ethos-1/ does.

Thanks,
marie

Hi Marie,

In that case, may I know the URL that has this issue? I checked and you have multiple sites and I’m not sure which one has this issue.

Thanks!

Sorry - The issue is currently on https://www.mariegale.com

Hi MarieGale,

Please consider that converting from X to Pro does not have anything to do with the pagination. The case you are experiencing is because you changed the Renew to Ethos. The Ethos has a different system and you will not have pagination in pages that you set as the main blog page as you can see here:

http://demo.theme.co/ethos-1/

The pagination will be available if you go to Posts > Categories and click a category to view in the front end like:

http://demo.theme.co/ethos-1/category/fashion/

So if you insist on having a pagination in the main blog page you need to avoid using Ethos stack.

Thank you.

I can live without pagination on the main blog page.

But the issue is that I don’t have pagination on the category pages as is shown in the Ethos demo.

See, for example: https://www.mariegale.com/category/legislation-regulation/

Hello There,

Please be advised that the pagination will only occur if the post items displayed is beyond the number of posts that you have allowed to display. The WordPress defaults is only 10 posts. In your case, it is already displaying 15 post items. I am assuming that you have set it more than the actual total number of posts in your site which is why the pagination is not displayed. Please go to Settings > Reading and change the “Blog pages show at most” to at least 10 so that the pagination will display.

Please let us know how it goes.

Yes, it’s set to 15 just to show more posts since there is no pagination. There are about 30 posts in that category. Other categories have nearly 100 posts. Hence the need for the pagination. Without it there is no way to scroll thru the posts and see what’s there.

Native pagination is not showing up and I don’t know why.

Hi MarieGale,

That is strange! Would you please update the theme to version 2.1.3 and get back to us with the URL/User/Pass of your website in a Secure Note to follow up?

Also test for a plugin conflict. You can do this by deactivating all third-party plugins, and see if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Thank you.

I have tested for plugin conflict - no joy there.

What login information do you need - wordpress admin? database?

Marie

Hello Marie,

Thanks for updating the thread.

Please share WordPress login details in a secure note for us to take a closer look.

Thanks.

I’ve added the secure login to wp - admin rights.

Please let me know what you determine on the pagination.

Hello There,

It seems that the function pagenavi() is not being rendered or displayed in your site. I already remove the one you added in your child theme. I even re added again for testing and still, it is not displaying or getting rendered in the front end. There could be a plugin and uses this function which I am not sure of. This could be caused by a 3rd party plugin. You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Please let us know how it goes.

I deactivated all plugins and pagination did not display.

I even changed to the Twenty-Seventeen AND deactivated all of the plugins and still no navigation.

I checked my database (wp-options table) for any options with “nav” or “page” in them — nothing that made a difference.

do you have any other suggestions of what I might try to determine why pagenavi() is not functioning?

Hello There,

Would you mind providing us the ftp login credentials of your site so we can take a closer look and investigate further? There maybe some corrupted files or something. To do this, you can make a post with the following info:

  • FTP Hostname
  • FTP Username
  • FTP Password

Thank you.

Posted the secure note with FTP login in the previous post (I couldn’t figure out how to add to this response).

It looks like the issue is in pagination.php (/wp-content/themes/pro/framework/functions/frontend/pagination.php) lines 42 and 43:

Line 42 sets $numposts as $wp_query->found_posts; but it returns 0
Line 43 sets $max_page as $wp_query->max_num_pages; but it also returns 0

So on line 100 (my file - I added a comment) … if ($max_page > 1) returns false and the pagination is not displayed. If “always show” is set to true (1), then the pagination html displays, but but no pages are displayed because $max_page is 0.

I didn’t track back to see where the $wp_query->found_posts; and $wp_query->max_num_pages are set — but that seems to be the problem.

Hi @MarieGale

I’ve double checked this issue and it seems that pagination isn’t working even with all of your plugins disabled and the default WordPress theme is activated.

So this issue can’t be related to our theme only by now, I’ve also checked my installation in localhost and the navigation is working fine on Category Archive pages on both the default WordPress theme and our themes.

I believe this has something to do with either your server configuration or WordPress options, something that I’m missing, perhaps posting about this issue in WordPress support forums will be the best thing you can do.

P.S. the FTP login credentials showed only this directory.

Thanks.

Oddly enough, I have another site that is a clean install — new site, new db, new sp install, new pro install, and I have the same issue on that site - pagenavi() doesn’t have $max_num_pages so it doesn’t display the pagination.

It’s definitely an issue that the $wp_query object referenced during the pagenavi() method has a $max_num_pages property, but it is set to 0 (which is wrong).

I had the same issue with the X theme (before upgrading to Pro) …

I did some searching for the issue and it seems to be relevant to custom pages … have you had any similar situations with the x or pro templates?

Hello There,

Even using Twenty Seventeen theme, the pagination does not works out in your site.

I have tested it in the site and this is how it resulted to:

In my test site using the Twenty Seventeen, it should display something like this:

I would highly recommend that you create a staging site that is not using the same server. This is to ensure that the live site and your site site has a different server settings and then we can compare why the pagination does not work in your live site. You may use “pantheon.io” or any other site.

Please let us know how it goes.