It is very helpful to see all of the shortcodes in one place; thanks.
First, I notice a difference between your “pagination” shortcode, which contains posts_per_page=2
, and your “gallery” shortcode, which contains posts_per_page=40
. The posts_per_page=
parameter must be the same in both shortcodes so the two shortcodes agree on how many pages are in the entire gallery.
Second, it looks like both of your pagination shortcodes still contain mla_link_href="{+page_url+}?term_slug
; for the Spanish page they must be changed to mla_link_href="{+page_url+}&term_slug
.
You should make both of the above corrections, but they will not solve the rest of the problem, substitution of “%38
” for “&
” and “%3D
” for “=
“. I have a new theory about that and an experiment for you to try. Please put <code></code>
delimiters around your shortcodes, i.e.:
<code>[mla_gallery post_mime_type=all post_parent=all attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" mla_nolink_text="No pages to show." posts_per_page=2 mla_output="paginate_links,prev_next" mla_link_href="{+page_url+}&term_slug={+request:term_slug+}"]</code>
You may be having the same WordPress bug I have seen in other topics, such as:
Can’t figure out how to use date_query
Give these fixes a try and post an update. Thanks for your persistence on this adventure.