Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Are you using a Page query type or Widget? If not Page, are you displaying with shortcode?

    Thread Starter Handoko

    (@handoko-zhang)

    It’s using a Page query and shortcode. Here is the settings:

    Display Title: None
    Template Style: table
    Row Style: fields, complete
    Posts Per Page: 5
    Posts Status: publish
    Offset: 0
    Header: None
    Footer: None
    Empty Text: None
    Wrapper Classes: None
    Page path: (secret)
    Page Template: index.php
    Pager: on, numbers

    The data to be shown is not for public, only for users who have password can access. For that reason it is displayed using a shortcode “[query id=1]” on a wordpress password protected page. For further its security, I intentional put a ” ” (space) in front of the Page path, so if anyone access the URL directly will receive a 404 error.

    The query result is showing correctly. On the first page, it shows the page numbers (1, 2, 3) and a next link. If I clicked the page 2, 3 or next, it works correctly. But the problem is if current page is 2 or 3, the page 1 link is not able to click, and the previous link never shown.

    If I set the pager to Default, it works without any problem.

    For your information, it is a sub domain of a multisite installation. The data to be shown is a custom post type using Pods plugin.

    If you really need to see the website, I may generate a test page, or perhaps temporary disable the password, so you can test it yourself.

    Thread Starter Handoko

    (@handoko-zhang)

    Hello, I found something and want to report.

    If I set the URL to ‘correct’ URL, than the issue solved.

    For example, I’m using the URL = ” secret”. It will show by using the shortcode on a page. But this will case the pagination (Pager = Numbers) won’t work correctly. If if set the URL = “secret” (without a space at the beginning), the pagination has no issue.

    This issue, perhaps is my fault by not providing a correct URL. But why it works without problem if using Default pagination? Can you please also make it also works correctly if using Numbers pagination?

    Or perhaps you can consider to add a password feature. It will be make this plugin more useful, in many cases we do not wish to expose the data to the public. Or, how about a feature to make the page only can be called using shortcode, not by direct typing the URL?

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    I think I understand. For what you’re trying to do, you don’t want a ‘page’ query. You should create your query as a ‘widget’ and then put the shortcode on the password protected WordPress Page.

    The ‘page’ query type is for exposing the query as an accessible route, like /secret . If you don’t want to expose a route for the query at all, you should just make a ‘widget’ query and past the shortcode where you need it.

    In the future, I plan to remove the ‘page’ query, and encourage people to use shortcodes on WordPress Pages. So what you’re doing is mostly right, you just don’t want the query type to be a page.

    Could you: remake the query as a widget, delete the page query, then test your new widget query’s shortcode on the password protected WP Page, and let me know if there continues to be pagination problems?

    Thread Starter Handoko

    (@handoko-zhang)

    Thank your for you explanation. I’m going to try it not, and will report back half hour later.

    Thread Starter Handoko

    (@handoko-zhang)

    Hello, I’m back to report.

    I’ve changed it to a widget query and deleted the page query. Now the page is using [query id=2], which mean it is not the previous query.

    The result is same. If you click the page 2, 3 or next, you won’t able to click the page 1.

    Please visit this site, there has the link to the non-public site:
    https://inbika.com/

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    That was very helpful, thank you. I’ve found the bug and can release a fix for it tomorrow.

    If you want to try the fix manually, it is in /query-wrangler/includes/theme.inc line ~489. Change get_query_var('paged') to qw_get_page_number($qw_query).

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Should be fixed in 1.5rc18, please let me know if you have any issues.

    For reference, I moved all pager related code to the includes/basics/pager.inc

    Thread Starter Handoko

    (@handoko-zhang)

    The problem solved after installed version 1.5rc18. Thank you for the fix.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘"Pagination: Page Numbers" doesn't work correctly’ is closed to new replies.