Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1247937

    It seems as though the ability to add custom css classes to images in the media library has been eliminated in Enfold? I expected to find this when I selection “Edit more details” but the Advanced Options do not appear. In the settings for my child theme, I selected “Show element options for developers” under Layout Builder, but to no avail. What am I missing?

    #1248053

    Hey milkrow,

    You can add a class to an image if you open the element options, it’s in the Advanced tab->Developer Settings.

    Best regards,
    Rikard

    #1248149

    Good morning Rikard,
    The image isn’t placed in its own element. I want to add a class to multiple images that are in a masonry gallery. The issue I’m facing is that the images are of paintings, which have titles that need to be italic…that part is easy, its the ones that do not have official titles. The title field for those images contains <span class=”roman”>Not titled</span>, but of course that shows up in the title tag (yuck!). So the way one might normally do this is to edit the advanced options and put the class “roman” there. I think this would make the most sense if it were done from within the media library. I don’t think I have another way to do this with on multiple images placed in a gallery…thus the question about accessing Advanced Options. Those fields still exist in the db, right? Let me know what you think.

    #1248511

    Hi Rikard,
    Any assistance on this would be most appreciated, thank you!
    KC

    #1248653

    Hi milkrow,

    Could you please give us a link to your website, we need more context to be able to help you.

    Could you please attach a mockup of what you’re trying to achieve?

    Best regards,
    Victoria

    #1249711
    This reply has been marked as private.
    #1250424

    Hi milkrow,

    The image element in the Advanced Layout Builder still has the option to add the custom class but images in the Media library don’t have such an option. The Media Library is a general WordPress function and the theme does not change or control it.

    I am still not clear what exactly you’re trying to do here. Can you please explain a bit more?

    What should happen when the image title is not added?

    Best regards,
    Victoria

    #1250523

    Hi Victoria,
    If you look at the screen shots I sent, you’ll see that I have a masonry gallery and in that gallery, there are images some of which have titles (title field) which are in an italic font (achieved via a css class applied to all titles), and some which have titles which are not italic, which is achieved by putting a span class (e.g., “roman”) directly in the title field. To avoid having the title tag appear (on hover) and show the span class…I want to add the class another way, but I cannot find a way to add a css class to certain images in Enfold. I thought there was a place in the media library to add a class…to be clear these images are not in separate image elements, they are in a masonry gallery.

    #1251415

    Hi Victoria,
    I would very much like to see there be a way to add a class to any image…that was a legacy feature in WordPress I believe…whereby you could choose advanced options and add a class, but perhaps that was not carried through to the latest version (not sure why). However, I do have a work around for now which is to use a pseudo class to write the content I want wherever there is an empty field and then style that.

    h3.someclass:empty:before {
    content: "something";
    font-style: normal;
    }

    Not ideal, but it does the job, for now.

    #1251462

    Hi milkrow,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1251463

    Hi milkrow,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1251476

    This solution leaves me with no title tag attribute. Unfortunately. BTW, I thought of another way to handle this, should anyone find this thread and need an option. You could create a separate gallery and add a class to that gallery, THEN style all the titles of that gallery. So you’d have one gallery with italic titles, then a separate gallery with roman titles. Just a thought. Hope that helps someone.

    #1252439

    Hi,

    Yes, using the custom css class or ID attributes helps a lot with styling. Thank you for that info.

    Best regards,
    Ismael

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.