Missing Pagination?

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.

I’m working on figuring it out. thanks for your help so far.

I did notice that there is a change on my website — maybe from your testing? Now the top of the category pages have a large scrolling banner for the posts … see picture.

Can you tell me how to turn that off?

thanks.

Also, looks like there may be some setting (the one just posted about or another) which is turning off the page navigation. I have fussed with the pagenavi() function and it’s not reflecting on the page - so I assume that it is not getting called for some reason? Some setting?

HI,

You can turn off the post slider in Theme Options > Ethos > Post Slider Archives

With regards to pagination, there is no setting that I know of, the only thing to make it not show is if you display all post in one page

As suggested by my colleague, please create a staging site on a separate server or in your computer so we can narrow down what is causing the issue.

Thnks

I have a work-around for the pagination – it is some custom programming in the child functions,php file which gets the correct number of posts. With that, the pagination works fine.

I may find a staging server and try to replicate the issue, but it’s not high priority at the moment with the workaround in place. If it becomes and issue otherwise, I will followup.

thanks for your attention to it.