• I am looking to re create the effect seen here: https://www.underconsideration.com/brandnew/

    Alongside the archive pages “next page” & “previous page” I want a drop down box that displays all the possible page numbers of the archive AND a page x of xx text.

    There has to be a way of doing this but I can’t find anything on google.

    Thanks so much guys.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have written a sample function that works in the default theme with default permalinks. You can download it here.

    It may work with pretty permalinks, but has not been tested that way.

    You will probably need to tweak the classes and add some CSS to get it to display the way you want.

    Feedback is welcome. Email m_a_mcdonald =at= bellsouth =dot= net.

    The version posted above does NOT work with pretty permalinks. I am working on a version that will. Stay tuned.

    Why the regex on the prev/next links ? … shouldn’t this just be a standalone script that runs alongside the existing links?

    Non-regex version that works with and without permalinks.
    https://wordpress.pastebin.ca/1854008

    Only catch is the URLs are based on the main page, ie. example.com , example.com/page/1 (or example.com?paged=1).

    With a few adjustments it could work for other pages(like archives) to..

    vtxyzzy you’re welcome to hack up(or ignore) my code, it’s just to illustrate how i’d go about it, so take what you will from it… ??

    I used the regex for the (probably unlikely) case that some other plugin or function would be adding additional parameters to the URL.

    The code has been extensively reworked to incorporate pretty permalinks. It has been tested with the default theme in index.php, archive.php, and in a page template. Each of these was tested with the default permalinks and pretty permalinks.

    You can get an updated copy here.

    @t31os_, the case of additional parameters was not so unlikely. Both the archive.php and the page template had them when using the default permalinks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Dropdown pagination’ is closed to new replies.