WordPress.org

Ready to get started?Download WordPress

Forums

WP Publication Archive
[resolved] Pagination with category filters (4 posts)

  1. Naturalrush
    Member
    Posted 2 years ago #

    Using latest WP 3.2.1 and latest version of the plugin.

    Thanks for making this and putting it out. It works better than a few other plugins with document repository functionality. I'm evaluating it for a simple document repository and so far so good except for a couple issues that are related.

    1) There may be a more effective way to do this, but I wanted to be able to select a category and show the documents in that category. What I came up with as a solutiion was to use the categories argument on several different pages (e.g. [wp-publication-archive categories="Agency Meeting Notes"] ). Then I displayed those page links in a text widget. It works, but leads to the next issue.

    2) The way the pagination works appears to be that if there are more than 10 docs it shows the pagination. But, if I'm using a category "filter", I may only see one document but the pagination shows. That shouldn't be the case.

    I'm new to working with custom post types. Just speculation on this, but if we could use the category archive or query functionality, a count could be gathered and the paging could take that into account to work okay.

    Any suggestions would be great. I'm going to poke around a bit to see if I can come up with something. I am no WP expert, just know enough to be dangerous.

    -Ray

    http://wordpress.org/extend/plugins/wp-publication-archive/

  2. Eric Mann
    Member
    Plugin Author

    Posted 2 years ago #

    The pagination shouldn't be showing up if fewer than 10 documents are returned while you're using a category filter. You've probably found a bug.

    Is there any chance you can provide me with the following:

    • The exact code you're using that's generating the bug
    • A screenshot demonstrating it

    These will make it easier for me to troubleshoot the error.

  3. Naturalrush
    Member
    Posted 2 years ago #

    Screen should show up below this.
    screenshot.823

    The exact code being used is
    [wp-publication-archive categories="Agency Meeting Notes"]

    I did find a work around.
    In line 256 of class.wp-publication-archive.php, where there is
    if (wp_count_posts( 'publication')->publish > 10) {
    using this instead appears to give the correct behavior
    if ( count($publications) > 10) {

    Thanks,
    -Ray

  4. Eric Mann
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks Ray!

    I've added that change to the codebase so that it will be there when the next version comes out: https://github.com/ericmann/WP-Publication-Archive/commit/32c42d20284906debe67de5afb9c2738a6d6be1f

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic