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