• Resolved joefryfoto

    (@joefryfoto)


    I’ve used your code to create some awesome functioning by inserting html into the caption, but I’m stuck at the following point: I have a custom field in the attachment I want to use to turn off the caption overlay when the caption (actually the title, but same difference) is an empty string.

    But I can’t do anything to insert a class into mgl-caption. I managed to find mgl-caption in the cell.tpl.php file, but thinking about how I might go about that is beyond my ken.

    There might be a hackish css workaround, but so far I’m coming up empty. Any ideas?

Viewing 1 replies (of 1 total)
  • Thread Starter joefryfoto

    (@joefryfoto)

    I ended up doing a hack that looks pretty decent.

    .mgl-item figcaption background set to 0% (I guess I could have just specified no captions, doh!)

    Then I wrapped my title text in a span, class=’title-txt’ and set its background to around 50%. Added some padding to give it the same height as the shopping cart button floated right in the caption frame. I’m still working on neatening things up to deal with truncated titles on smaller mobiles.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <aside>
    So I managed to create a workable WooCommerce gallery using Meow Gallery “naturally”!
    (I made it easy to create a link by matching my attachment title to the WooCommerce product title.)

    As soon as I clean up my spaghetti code I intend to document it on my blog, along with the many trials and tribulations trying to set up a separate WooCommerce tiled gallery. In some sense I think this could be a game-changer of sorts, as WooCommerce advanced gallery solutions are few and far between.

    Jordy, a future request would be to allow user input for a set space below the image, and allow the user to specify in Meow Gallery the name of the boolean custom field in the attachment that would turn it on or off as the gallery is assembled, if that makes sense.
    </aside>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Jordy, again many thanks for a superb product!

Viewing 1 replies (of 1 total)

The topic ‘Access to caption wrapper tag?’ is closed to new replies.