Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter georg4re

    (@georg4re)

    Also, it was my understanding that if I placed this shortcode:

    [mla_gallery category=real-weddings]

    The gallery would show all the images attached to posts with category real-weddings. It doesn’t seem to be doing that.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your question – this is the first one I have received on pagination. Like the WordPress [gallery] shortcode, MLA’s [mla_gallery] shortcode lets you specify pagination parameters. The MLA Documentation says:

    Pagination Parameters

    The [mla_gallery] shortcode supplies “nopaging=true” as a default parameter. If you are working with a template that supports pagination you can replace this with specific values for “numberposts”, “posts_per_page”, “posts_per_archive_page”, “paged” and/or “offset” . You can also pass “paged=current” to suppress the “nopaging” default; “current” will be replaced by the appropriate value (get_query_var(‘paged’)).

    Implementing pagination is a site- and theme-specific project involving PHP coding and creating WordPress template files. If you are comfortable with PHP coding, the best way to get the number of images in a gallery involves running the query and counting the results. Something like:

    $count = count( MLAShortcodes::mla_get_shortcode_attachments( 0, array( 'post_parent' => 'all' ) ) );

    where 'post_parent' => 'all' is replaced with the query parameters specific to the gallery in question.

    With respect to your second question, category=real-weddings, that query would show the images (attachments) that have been assigned to the real-weddings category. MLA lets you assign terms to attachments in the same way they are assigned to posts/pages. The taxonomy parameters operate on the attachments themselves, not the posts/pages they might be attached to. Does that make sense?

    I’m happy to work with you on issues related to your theme and PHP code, but it might be too site-specific for the MLA support forum. If you want to pursue this discussion offline, send me your e-mail address (or telephone number) and I will respond to continue the dialog. Go to the “Contact Us” page at our web site:

    Fair Trade Judaica/Contact Us

    Thanks for understanding.

    David

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 1.42, which includes support for pagination of [mla_gallery] shortcodes. Complete information and examples are on the Settings/Media Library Assistant Documentation tab.

    I hope the new pagination features and my remarks on taxonomy parameters have answered your questions. I am marking this topic resolved for now. Please feel free to re-open it or contact me if you have any problems or further questions.

    Thanks for your interest in the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Implementing Pagination’ is closed to new replies.