Forum Replies Created

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter cristiano771

    (@cristiano771)

    Thank you! I had wrote something wrong in the code, now it works fine!
    Have a nice day,
    Cristiano

    Thread Starter cristiano771

    (@cristiano771)

    <form id="mla-text-form" action="." method="post" class="row">
    <table>
    <tr><td colspan="3">è possibile selezionare, dalle categorie principali, gli ordini o le specie da visualizzare. La seconda selezione mostra le thumbnail della specie. Cliccando su ciascuna thumbnail è possibile richiedere la stampa della foto.</td></td>
    <tr>
    <td>Selezione Categoria / Specie</td>
    <td>
    [mla_term_list taxonomy=attachment_category mla_output=dropdown mla_control_name=main_category child_of="400" mla_item_parameter=current_main_category show_count=false use_filters=true depth=1 hierarchical=true use_filters=true]
    <br/>
    [mla_term_list taxonomy=attachment_category mla_output=dropdown mla_option_value="{+slug+}" child_of="{+template:({+request:main_category+}|1)+}" mla_control_name=sub_category mla_item_parameter=current_sub_category show_count=true hierarchical=true depth=0 use_filters=true]
    </td>
    <td>
    <input id="text-form-submit" name="text_form_submit" type="submit" value="SELEZIONA">
    </td>
    </tr>
    </table>
    </form>
     <br/>
    [mla_gallery]
    attachment_category="{+template:({+request:sub_category+}|no-term-selected)+}" 
    posts_per_page=25 mla_output="paginate_links,prev_next" orderby=date order=DESC
    mla_link_href="{+new_url+}?mla_paginate_current={+new_page+}&main_category={+request:main_category+}&sub_category={+request:sub_category,url+}"
    [/mla_gallery]
     
    [mla_gallery attachment_category="{+template:({+request:sub_category+}|no-term-selected)+}" posts_per_page=25 orderby=date order=DESC mla_caption="{+title+} : {+description+}" mla_link_href="/richiedi-stampa/?current_id={+attachment_ID+}" mla_nolink_text="Seleziona una categoria per visualizzare le immagini corrispondenti."]

    Thank you so much! I have just modified something:
    The first dropdown has child_of="400" and use_filters=true depth=1 hierarchical=true use_filters=true so it shows the main categories but not the category “ALL” (I use just to count all images). With depth=1" the dropdown is much more user friendly.

    Now I have a second question!
    Could I replicate the code to have a third dropdown? (so I could show one level of sub-categories for each dropdown).

    Thank you a lot for your kindness and you so useful job!
    Cristiano

    Thread Starter cristiano771

    (@cristiano771)

    I have partially solved with this coding:

    [mla_gallery my_custom_sql="attachment_tag=wide orderby=date order=DESC"  mla_link_href='{+site_url+}/{+parent_name+}/' mla_style="responsive" posts_per_page=8  columns=0 size="thumbnail"]
    <div style="clear: both; float: left">
    [mla_gallery my_custom_sql="attachment_tag=wide" posts_per_page=8 mla_output="previous_page,first" mla_link_text='← Pagina precedente' mla_rollover_text="Pagina precedente"]
    </div>
    <div style="float: right">
    [mla_gallery my_custom_sql="attachment_tag=wide" posts_per_page=8 mla_output="next_page,last" mla_link_text='Pagina successiva →' mla_rollover_text="Pagina successiva"]
    </div>

    And

    <style type="text/css">
    #[+selector+] {
        text-align: center;
        margin: auto;
    }
    #[+selector+] .gallery-item {
        display: inline-block;
        margin: auto;
        padding: 5px;
        height: auto;
        text-align: center;
    }
    #[+selector+] .gallery-item .gallery-icon img {
        display: inline;
        margin: auto;
        border: 0px solid #ffffff;
        max-width: 180px;
    }
    #[+selector+] .gallery-caption {
        visibility:none;
    }
    /* see mla_gallery_shortcode() in media-library-assistant/includes/class-mla-shortcodes.php */
    </style>

    Could be possible to have a 2 columns gallery on mobile?
    Thank you again,
    Cristiano

    Thread Starter cristiano771

    (@cristiano771)

    Thank you so much for the answer. It works fine.

    However I am now using a custom code snippet with a php function called by a custom shortcode. In this way I can eliminate the “( )” and the name of the term.

    I had just a little trouble with terms such as “Cavaliere d’Italia” because the count was zero… so I have renamed the term as “Cavaliere d-Italia”.

    Thank you again!

Viewing 4 replies - 16 through 19 (of 19 total)