Thanks for the positive feedback and for your question. Thanks as well for the link to your sample page; very helpful.
You asked “1) is it possible to left-align the tags in my term grid list?” Alignment and similar attributes for the tag cloud grid layout are supplied by a style template that generates inline styles just before the cloud display. You can create a custom style template to make any changes you need, or suppress the inline styles of you have another way of adjusting CSS content. The default template looks like this:
<style type='text/css'>
#[+selector+] {
margin: auto;
width: 100%;
}
#[+selector+] .tag-cloud-item {
float: [+float+];
margin: [+margin+];
text-align: center;
width: [+itemwidth+];
}
#[+selector+] .tag-cloud-caption {
margin-left: 0;
vertical-align: top;
}
/* see mla_tag_cloud() in media-library-assistant/includes/class-mla-shortcode-support.php */
</style>
You can change text-align: center;
to text-align: left;
to get the format you want.
You can find another example in this earlier topic, which also shows how to add a custom parameter to the template and shortcode so the value can change from cloud to cloud:
Please allow setting padding in the Shortcode
For your application:
- Navigate to the Settings/Media Library Assistant Shortcodes tab.
- Click on the “Tag Cloud” view below the Search Templates text box.
- Hover over the “tag-cloud (default)” Style entry and click the “Copy” action link.
- When the page refreshes, the “Edit Template” screen will appear. Change the template Name to (for example) “left-justified-cloud”.
- Scroll to the
#[+selector+] .tag-cloud-item
Styles and make the text-align:
change illustrated above.
- Scroll to the bottom and click “Update”.
Once you have the template set up you can add the mla_style=left-justified-cloud
parameter to your [mla_tag_cloud]
shortcode to replace the default styles. If you want to use your own styles you can suppress MLA’s inline styles by coding mla_style=none
.
You asked “2) is it possible to display the selected tag as a header above the gallery?” You can use a custom template for this purpose. First, you must modify your [mla_tag_cloud]
shortcode to pass the name of the term to the [mla_gallery]
shortcode. You did not post your shortcode text, but something like this should make sense for your application:
mla_link_href="{+page_url+}?term_slug={+slug+}&current_name={+name,url+}
This parameter adds a current_name
query argument to the URL and fills it with the term name, encoded for use in a URL. To display the name as a heading, change the default “Open” section in the markup template to something like this:
<h3>[+request:current_name+]</h3>
<div id='[+selector+]' class='gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+]'>
For your application:
- Navigate to the Settings/Media Library Assistant Shortcodes tab.
- Click on the “Gallery” view below the Search Templates text box.
- Hover over the “default (default)” Style entry and click the “Copy” action link.
- When the page refreshes, the “Edit Template” screen will appear. Change the template Name to (for example) “tagged-gallery”.
- Scroll to the “Open” section and add the heading as illustrated above.
- Scroll to the bottom and click “Update”.
Once you have the template set up you can add the mla_markup=tagged-gallery
parameter to your [mla_gallery]
shortcode to replace the default HTML markup.
You asked “3) is it possible to only show a few chosen tags?” In the “Tag Cloud Data Selection Parameters” of the Settings/Media Library Assistant Documentation tab you will find the include
and exclude
parameters, which should let you choose the tags for your cloud. You can find the term id values by going to the Media/taxonomy edit screens. Hover over the term name and look for the tag_ID=
argument in the editing URL.
I hope that gives you what you need to complete your application. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestions. Thanks for your interest in MLA.