I have been trying a number of solutions today without luck. Still pressing on, but it’s rather frustrating.
Here’s one page I checked out…
https://www.kevinleary.net/wordpress-pagination-paginate_links/
But the code didn’t work for me, I still only get the post link, and no link to any subpages of pagination.
A lot of what I search for ends up being total pagination replacements, which isn’t what I need. And the odds of any solution talking properly with PLP are rare. Also searches can be a little ambiguous as you end up finding code that just makes the search results have a paginated look if there’s more then a set number of results, which isn’t what I need.
Instead what I need is a solution to the search results itself in what links are shown and that it links to the subpage of a post, not the post itself. It makes finding a solution tricky, or at least it has been so far.
For me I’m also wrapping my head around the logic a bit. If PLP breaks pages based on paragraphs (I use 5 paras) then how does the search function know where the pagination appears and how could the code of the search know how to get the links? Are the links that PLP builds at the bottom of a page (next, previous, page#) only in PLP? Or do they become something that the WordPress search function should be able to find? This is where I don’t follow the logic.
WordPress search, at its basic core, will only ever look for posts and pages, but how does it even know PLP pagination exist and that PLP is creating its own links?
For example here’s a link to the post, which is what I always get in search results…
https://test2.fotko.org/?p=10
But I need the link to be the paginated link, to the exact page the search matches, like this…
https://test2.fotko.org/?p=10&page=4
So how would the WordPress search function get that on its own, without talking to PLP? Or without knowing where PLP makes its page breaks? Since nothing is written by the user on the post to break the page, and its all handled by PLP’s options, how would the search know this?
This for me is where it seems to at least be related to PLP, in some way, and not solely a WordPress search issue. Does that make sense?
I’m continuing my search but wanted to post a little about what I was trying to hopefully get the ball rolling or find out what I’m missing.