• This is the issue: a site has a page that is ‘cut up’ with page-endings, so it is a page with pagination.
    When I use the WordPress search form the results will always go to page one, and not to the correct page.

    so for example: I look for a word and that can be found on page 15 of the total page. So that word can be found on url/page-name/15

    But when I search that word with the search form:
    the results will NOT go to url/page-name/15
    but to url/page-name/
    meaning people will have to click through 15 pages to find it.

    This is not a workable way of searching.
    Is there a solution for this problem? Or should we make really seperate pages instead of a page with pagination?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Separate pages would allow the default search to work, but individual WP pages don’t actually paginate, so it’ll take some extra effort to group pages and chain a sequence together.

    The alternative would be to modify the default search to get it to determine the actual sub-page and link to it instead of the first page. Because all pages exist together in one DB record, this is not easily done. The modification would need to parse through much of the page content to figure out on which page the search hit occurred. It would be an inefficient process that would need to be done for every search result, paginated or not.

    Neither approach is a great solution. I’m leaning towards the separate page solution as preferable. Pages subsequent to the first could be child pages whose titles follow the format page-#, so the third page’s URL for example might be example.com/parent-name/page-3/.

    In order to automatically link to various pages in the family, your page template would need a custom pagination function, though it might be possible to get paginate_links() to handle this kind of set up.

    Thread Starter omniafausta

    (@omniafausta)

    thanks for you reply! I will discuss it with the page owner!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘searching on page with pagination’ is closed to new replies.