• Resolved bhasic

    (@bhasic)


    Seems like a great plugin, but I’ a’m unable to make pagination work. I have tried examples from documentation, this works:

    [mla_gallery attachment_category=big-dog posts_per_page=12]
    
    [mla_gallery attachment_category=big-dog posts_per_page=12 mla_output="paginate_links,prev_next"]

    This doesn’t show pagination:

    [mla_tag_cloud taxonomy=attachment_category number=0 mla_link_href="{+page_url+}?term_slug={+slug+}"]
     
    [mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+} posts_per_page=12" mla_output="paginate_links,prev_next" mla_link_href="{+page_url+}?term_slug={+request:term_slug+}"]
    
    [mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" posts_per_page=12 mla_nolink_text="Click a term to display the gallery."]

    • This topic was modified 1 year, 5 months ago by bhasic.
    • This topic was modified 1 year, 5 months ago by bhasic.
    • This topic was modified 1 year, 5 months ago by bhasic.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter bhasic

    (@bhasic)

    I think there’s an error in the documentation.

    This works until I go to second page in pagination:

    [mla_tag_cloud taxonomy=attachment_category number=0 mla_link_href="{+page_url+}?term_slug={+slug+}"]
    
    [mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" posts_per_page="12" mla_output="paginate_links,prev_next" mla_link_href="{+page_url+}" term_slug="{+request:term_slug+}"]
    
    [mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" posts_per_page=12 mla_nolink_text="Click a term to display the gallery."]
    • This reply was modified 1 year, 5 months ago by bhasic.
    Plugin Author David Lingren

    (@dglingren)

    Thanks for the good words about MLA and for your question. Thanks as well for the time you took to find and adapt the “Tag Cloud and Gallery” example from the Settings/Media Library Assistant Documentation tab.

    I believe the example in the Documentation is correct. If you look carefully at your pagination shortcode you will see a small difference. Your shortcode has term_slug="{+request:term_slug+}" as a separate shortcode parameter. In the example, this is part of the mla_link_href= parameter. Here is the pagination shortcode that is working on my system:

    [mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" posts_per_page="12" mla_output="paginate_links,prev_next" mla_link_href='{+page_url+}?term_slug={+request:term_slug+}']

    Give that change a try and it should get you the proper results. I am marking this topic resolved, but please update it if you have problems or further questions regarding the above suggestion. Thanks for your interest in the plugin.

    Thread Starter bhasic

    (@bhasic)

    Thank you, it works now. Still it is like this in the plugin documentation https://davidlingren.com/assets/mla-doc.html#cloud_and_gallery

    [mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+} posts_per_page=12" mla_output="paginate_links,prev_next" mla_link_href="{+page_url+}?term_slug={+request:term_slug+}"]
    Plugin Author David Lingren

    (@dglingren)

    Thanks for the good news and for drawing my attention to the missing double-quote at the end of the attachment_category= parameter in the example shortcode. I have corrected the Documentation for my next update.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t get pagination to work’ is closed to new replies.