WordPress.org

Ready to get started?Download WordPress

Forums

WP Publication Archive
[resolved] show more than 10 links per page (12 posts)

  1. Eskwander
    Member
    Posted 2 years ago #

    I've tried getting that by changing the number of posts per page in the "lecture" menu of wordpress, but it doesn't affect the page with publication-archive

    do you have any solution ?
    I'd like to put 40-50 publication posts per page
    thanks !!

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

  2. Eskwander
    Member
    Posted 2 years ago #

    might be useful, link to my page : http://www.riponne.ch/telechargements/

  3. Eric Mann
    Member
    Plugin Author

    Posted 2 years ago #

    There's actually a hook for that.

    function allow_more_pubs( $limit ) {
        return 40;
    }
    add_filter( 'wpa-pubs_per_page', 'allow_more_pubs' );

    Just add this code to your own functionality plugin or to functions.php to make things work.

    By default, the limit is set to 10, but I allow you to filter that limit and make it whatever value you need.

  4. lawall
    Member
    Posted 1 year ago #

    I'm a newbie to wordpress but i have your plugin working. Could you tell me where i would find the functions.php file? should i be able to find it in my wordpress menus? thanks

  5. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    The functions.php file in in your theme.

  6. lawall
    Member
    Posted 1 year ago #

    thanks, this worked in the old version, but doesn't seem to do anything in the new version. any suggestions?

  7. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    lawall,

    That's because I removed the filter in the new version. Well, not so much removed it as renamed it (to be cleaner) and forgot to let everyone know. The correct filter you should be using from now on is wppa_list_limit.

    Notice it uses all underscores rather than a random mix of underscores and hyphens. And it properly prefixes with the plugin abbreviation: WP Publication Archive -- wppa.

    But to make life easier, I've re-added the older filter. You don't need to change any of your code, just update to version 2.5.3.

  8. Joe Nasevich
    Member
    Posted 1 year ago #

    Hi Eric,

    This limit also affects the number of items displayed in a drop-down list as well. It would be a nice enhancement if the number of links displayed was configurable through the WordPress Dashboard. A lot of folks (my client included) don't feel comfortable editing PHP code (and they wouldn't have to come back to me to ask to do it for them).

    Still a great plugin! Keep up the good work!

    Joe Nasevich
    [sig moderated as per the Forum Rules]

  9. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    It would be a nice enhancement if the number of links displayed was configurable through the WordPress Dashboard.

    That's certainly one approach, but one I specifically avoided as not not needlessly clutter the Dashboard any more than it already is.

  10. esd3104
    Member
    Posted 1 year ago #

    First I like this plugin - thanks. I'm using it for a newsletter archive by month/by year.

    So I ran into the 10 per page limit (since I need 12 per page for a year of newsletters) and see the instructions on how to change the limit. I'm a noob at WP but I understood it enough to be dangerous, I think ;-)

    However, as I went to add the necessary code to functions.php I run into a big warning from the Weaver II theme I'm using which tells me not to edit the file and make a child theme. That's a bit over my head, for now anyway, so is there any other way I can make this change?

    Some sort of parm/setting within the WP UI or a setting within the plug-in would be a very nice enhancement.

    Are there any easier options than me having to figure out what a child theme is to get from 10 per page to 12 per page?

    Thanks

  11. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    The decision to not have a UI for this option (or many of the others within the plugin) was intentional and is not going to change.

    However, if you are using the shortcode to generate your listings, you can add a limit parameter to adjust the number of publications:

    [wp-publication-archive limit=12 /]

  12. esd3104
    Member
    Posted 1 year ago #

    THANK YOU - that's simple and effective and a bloody fast reply! I used it already and it works great.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic