Tell us what you are trying to do?
I wanted a post type whereby I can present daily posts, which would appear on my website, (some weekly and some daily). The heading is meant to come with a color code for each post. I intend the color to appear beside the heading as a small circle or Square.
My issue is that I couldn't get hexcode to work through the plugin. I have tried using 'Select' element' so that the color can be conveniently picked at the form level, without having to write anything, it would not work. It kept presenting what i wrote. (Green or #008000). I tried "Single line" element, still no luck and worst, I used "color picker" element, which I don't want to use because the colors will not be consistent, but i used it and at the field group creation level, I see the color beside the code but at the Content template or view level, the color doesn't show up, only the hex code. Can you look into this for me?
If I am having this problem at the level of just making color appear right, I wonder what will happen at the point of making the display conditions abit more complex that mere hexcode...
Thank you.
Is there a similar example that we can see?
Image attached
I do not want the whole section in the color as presented in this example. Just a box or circle beside the heading with the corresponding color.
What is the link to your site?
hidden link
Hi,
This is a matter of custom CSS and not the field that you want to store the color code in. You can use whatever method you want to add the color.
But then in the view you need to use HTML code and retrieve the field info and add for example border color using style attribute.
You can use the Fields and Text block to be able to add the custom HTML code something like this:
<div style="border: 1px solid [types field='my-field'][/types]">The box content<div>
You can use the Fields and text types button to generate the shrotcode "[types field='my-field'][/types]" if you do not know what to add there.
But generally, the shortcode field attribute is the slug of the custom field that you have created.
Thanks.