I've been trying to get this done for hours now and it's just not working.
I have a custom wordpress plugin that has a search box on the front-end that one can use to search for data from my custom tables. (Please note that it doesn't have anything to do with searching posts.) The search works fine (I'm currently using the GET method if that makes any difference) and I'm able to get the correct results. However, I'm trying to add pagination to the search results but for some reason it's just not working. I tried following the answer that was given to this question by Hemi:
To test it, I set the limit to 1 to see if it would work accordingly. However, instead of bring out 1 search result per page, it brings out 5 in the first page and none in the second page. I've also tried using the other solutions provided there but it still doesn't work. At first I thought it had something to do with not using get_results and num_rows properly but when I echoed the values I saw that they were correct. I've done something like this before in wordpress following a method similar to the one provided by Lawrence Cherone in the previous link without any problem so why this is not working properly is beyond me. Is there a correct wordpress way or style of paginating search results of a custom search that's in a custom plugin that doesn't have anything to do with posts?
Thanks in advance! I'll be really glad if someone could help me.