Home › Forums › Add-ons › Flexible Content Field › Wrapper class to flexible content fields › Reply To: Wrapper class to flexible content fields
Hi @smeisinger
I would not recommend hacking the core plugin. You wont be able to update without redoing your hack again each time an update is available.
If we take a look at the outer element for each flexible field content you’ll find that it contains a data-attribute with the flexible fields name. We can use that to target each specific type. Here’s an example that should be enough for you to go on! I haven’t tested this live.
.layout[data-layout="flexiblefieldname1"] {
position: relative;
}
/* An example of how you might add your custom icons. This example is using an imaginary icon-font but you could do it differently */
.layout[data-layout="flexiblefieldname1"]:after {
content: 'a'; /* our textfield icon for example */
text-transform: none !important;
font-weight: normal !important;
font-style: normal !important;
font-variant: normal !important;
font-family: "Name of your icon font" !important;
line-height: 1;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
position: absolute;
right: 70px; /* make sure the icon appears to the left of the hover icons */
top: 5px;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.