• Resolved jhdean

    (@jhdean)


    Hi David,

    I’ve been using the following shortcode for years. I noticed recently that the gallery only displays with one column instead of four.

    I’m using Elementor. What things should I check to see why the column number isn’t correct?

    `[mla_gallery columns=4?mla_search_fields=title s=”{+page_title+}” ?sentence=true ?link=”file” size=small mla_caption=” ” meta_key=”image_sort_name” orderby=meta_value order=”ASC”?tax_query=”array(array(‘taxonomy’=>’post_tag’,’field’=>’slug’,’terms’=>’process’,’operator’=>’NOT IN’),’relation’=>’AND’)”]

    Thanks,
    Jeff

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Lingren

    (@dglingren)

    Good to hear from you again. Thanks for the question and for the link to your page; very helpful.

    I had a look at the HTML for your page and confirmed that the columns=2 setting is working as designed. You can tell because every second figure tag is styled last_in_row. The gallery in question looks like the [mla_gallery] parameters are somewhat different from the above example. It also looks like the image used in the gallery is not, in fact, “small. Here’s an example:

    <img data-opt-src="https://mlzb30sdacjp.i.optimole.com/KVY8W7Q-j5fUm93V/w:750/h:1000/q:auto/https://www.jeffreyhdean.com/wp-content/uploads/paleolithic-moonrise-0157.jpg" width="750" height="1000" src="https://mlzb30sdacjp.i.optimole.com/KVY8W7Q-j5fUm93V/w:522/h:696/q:auto/https://www.jeffreyhdean.com/wp-content/uploads/paleolithic-moonrise-0157.jpg" class="attachment-small size-small" alt="Bronze figure with alabaster moon, modeled after a fragment of mammoth pelvic bone." data-opt-lazy-loaded="true" data-opt-otimized-width="522" data-opt-optimized-height="696">
    

    The column alignment problem you are having is a result of the image size and CSS styles applied to the gallery by your theme, as is often the case. I was able to get somewhat better results by editing the styles MLA adds to the gallery:

    <style type="text/css">#mla_gallery-2 {
    		margin: auto;
    		width: 100%;
    	}
    	#mla_gallery-2 .gallery-item {
    		float: none;
            display: inline;
           
    		margin: 1.5%;
    		text-align: left;
    		width: 40%;
    		max-width: 40%;
    	}
    	#mla_gallery-2 .gallery-item div.gallery-icon {
    		display: inline;
    	}
    	#mla_gallery-2 .gallery-item .gallery-icon img {
    		border: 2px solid #cfcfcf;
    	width: 40%;
    	max-width: 40%;}
    	#mla_gallery-2 .gallery-caption {
    		margin-left: 0;
    		vertical-align: top;
    	}
    	/* see mla_gallery_shortcode() in media-library-assistant/includes/class-mla-shortcodes.php */</style>
    

    You could create a custom style template for your gallery to build on the changes shown above.

    I am by no means a CSS expert and I do not have much experience with the Elementor theme. I believe MLA is working properly, but you will have to determine why the theme is supplying a different image file and CSS styles that affect the results. I regret that I can’t give you more specific guidance, but I am marking this topic resolved because MLA does not seem to be contributing to the problem.

    Thread Starter jhdean

    (@jhdean)

    Thanks David,

    I added your custom css and it worked. I didn’t have success with other mla galleries on the page after inserting the correct gallery #. I’ll do some more work to see if I can get them to work as well.

    Thanks for your help!
    Jeff

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Column= not recognized’ is closed to new replies.