• 1. I’m not sure but in last few versions of NCG album pagination still isn’t fixed according to this solution. I have to do it manually again and again after each upgrade.

    2. I’m writing about the issue above because I can’t find a tip how to display an album with few newest galleries (ie. [nggalbum id=10 template=compact recent=3] or similar) what I’m going to do in a custom page template. A workaround would be to paginate album without displaying pagination (making a custom NGC template). Is there a ready solution for such a case?

    https://www.ads-software.com/plugins/nextcellent-gallery-nextgen-legacy/

Viewing 1 replies (of 1 total)
  • Thread Starter phoros

    (@phoros)

    OK, I’ve found a solution after reading nggfunctions.php a little.

    The case is as follows: I create a custom WP category template without the loop where I want to put a section “Newest galleries” and display last three galleries from an album. I also made a custom NCG template to do it in a specific way.

    So in WP template I use an album shortcode (with do_shortcode php function) and in NCG custom album template I’ve used the following piece of code:
    <?php array_splice($galleries, 3); ?>
    before the line:
    <?php foreach ($galleries as $gallery) : ?>.

    It seems to work fine.

    Additionally I was forced to define gallery links from the output manually because being outside of The Loop:

    <?php $gallery->pagelink = site_url() . '/gallery/?album=' . $album->id . '&gallery=' . $gallery->gid ; ?>

    This is because I want these three galleries to be linked to my main album page elswhere instead of displaying galleries here.

    I’m still working on this but you can see the results here.
    If there will be any issues I let you know.

    Maybe it’ll be useful for somebody.

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘Album limit / pagination’ is closed to new replies.