Search results pagination links not appearing

Hi guys,

I have a plugin, which adds pagination to certain pages (e.g. search results), and it's not rendering where it should be / no output.

It's based off of the standard Wordpress pagination code, as found here: https://codex.wordpress.org/Function_Reference/paginate_links

Example of the issue can be seen here:
http://demo.xlearn.net.au/?s=test

The plugin is located here:
/wp-content/plugins/pagination/pagination.php

Any thoughts on why this isn't working would be great.

Thanks!
Brett

  • Predrag Dubajic
    • Support

    Hi Brett,

    Could you attach zip your /wp-content/plugins/pagination/ folder, upload it to any file sharing service and paste here the download link so we can check the code.

    Also, since I'm still unable to access your site it might be best if you disable your site protection for visitor until we check these issues of yours.

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hi Brett,

    Forum members can only attach image files for security reasons, that's why asked for you to upload the zip to some file sharing service, for example sendspace.com and then share download link here.
    If there is only one file in question you can use pastebin.com to paste your code there and share link to your file.

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hi Brett,

    It looks to me there are not enough posts to show second page, if I change number of posts per page in Settings > Reading to 2, it does render for me as you can see from attached screenshot.

    I have restored number of posts per page to 10 so if you want to test this make sure you set it to lower number.

    Best regards,
    Predrag

  • Brett
    • Design Lord, Child of Thor

    Hi Predrag,

    Perhaps I have the wrong code then! I'm looking for something that will render out something like this:
    <----- ... 2 3 4.... ----->

    (where the arrows are previous / next)

    Where you can click on the numbers, and it will take you to that page of results. Any ideas on how I can do this? Sorry, I thought that this plugin rendered what I was looking for - it appears not!

  • Adam Czajczyk
    • Support Gorilla

    Helo Brett!

    I have copied plugin code that you shared and installed it on my test side. It immediately prompted me for update, which I did and the I've tested it (out-of-the-box) on my search result page (with Twenty Fifteen default WP theme).

    As you can see on an attached screenshot, it displays pretty much what you described. On "BWS Plugins -> Pagination" page of your dashboard you may do some further tweaking.

    That said, if this doesn't work like this on your setup I'd like to take a closer look but it seems that since my colleague @Predrag Dubajic visited your site's dashboard the support access has already expired.

    Woudn't you mind granting support access to your site again?

    Best regards,
    Adam

  • Brett
    • Design Lord, Child of Thor

    Hi Adam,

    I've extended the access, sorry about that - it must have expired.

    I think you're referring to a different plugin: BWS pagination
    https://wordpress.org/plugins/pagination/screenshots/

    This is not the plugin I have. The one I have, is just a generic one from the Wordpress Codex:
    http://pastebin.com/z3ycrC3V

    This doesn't render out what I'm looking for, which is:
    <----- ... 2 3 4.... ----->
    (where the arrows are previous / next)

    Hope this helps.

    Cheers,
    B.

  • Adam Czajczyk
    • Support Gorilla

    Hello Brett and thank you for your feedback!

    Actually, that quite a funny thing: as I mentioned before, I took the plugin code from your "pastebin" and activated in on my side - this prompted me to update and update brought BWS pagination. The plugin must have been re-branded then or just acquired by BWS.

    There's a prompt to update on your site as well :slight_smile:

    That said, I've put this original plugin on my site again and I'm still getting nice page number with Twenty Fifteen theme. In fact, this is the same with some other themes even with this plugin disabled. Another look at plugin's code made me think that this code actually does nothing except adding default pagination to older themes that doesn't support it at all. Therefore it does nothing in this case - disabling it on your site doesn't change a thing as well.

    Having said all this, I can think of two relatively simple solutions here:

    1) update your current "Pagination" plugin: it will install BWS Pagination instead and there's a settings section that allows you to replace default pagination with "numbered"

    2) add it manually to your theme; here's a nice description on this:

    http://www.wpbeginner.com/wp-themes/how-to-add-numeric-pagination-in-your-wordpress-theme/

    I hope that helps!

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.