You’re right, the new Metabox “icon field” is not supported yet. Since it’s a new field and afaik you’re the only one asking for it: would you be so kind to add this as a feature request to the idea board?
I’ll move the thread accordingly, since it is not a bug.
Shouldn’t it be expected that Bricks support all the field types of Meta Box?
I disagree that this should be a feature request to be voted on. That type of response is discouraging.
The marketing materials for Bricks would have a user believe that all custom field types would be supported. Additionally I want to highlight that the documentation (Dynamic Data – Bricks Academy) from Bricks Builder clearly states “custom fields” are supported in Meta Box, which again would lead a user who bought into Bricks Builder to believe that all custom field types are supported rather than a subset unless specifically called out differently.
So my two cents on this one… 1) either it needs to be called out better in the documentation if Bricks doesn’t intend to support all custom fields of Meta Box, or 2) it should be added with priority in a future update rather than needing to wait & see by collecting votes for it as a feature request.
I’ve just added it to the idea board, as you suggested.
I have full respect for your work and the team at Bricks. However, it is clear that Bricks does not solely rely on community input when implementing new features (which I think is a good approach). This is why it feels frustrating to have to do so when Bricks aims to have native support for Metabox.
Saying “I’m the only one asking” seems like a fallacy to me and appears unfounded and an unfair justification for not implementing it.
Thank you again for your understanding and for considering my suggestion.
For what it’s worth, @marcorubiol is maybe the only one asking, but he is not the only one that would be using it, if it was working.
I was also checking out this field some time ago and figured out it was not working, then I decided to go with file field and some custom code. I thought that it was something on my end and I did not want to investigate, because it was not critical.
So, once this filed will be working, at least two of us will be happy.
Ps. I don’t think this is a case for idea board.
Given that Bricks already has native support for Meta Box, many of us feel it should be an automatic “yes” to include these types of updates to the product, bypassing the need for voting on the ideas board for such a feature.
If Bricks Builder decides to stick with the voting process for new Meta Box fields, then it would be very beneficial to update the documentation at a minimum. Currently, it implies that all fields are supported, which can be confusing. As I’ve championed in past posts, clarity in documentation is absolutely essential for users.
Ideally, users of Meta Box would love to see Bricks Builder proactively prioritize adding new custom field types, especially for ACF and Meta Box, since Bricks claims native support for these products. Fingers crossed that we can see these additions without going through the full ideation route!
Thanks for your attention, and let’s hope for some positive developments.
For anyone who wants to implement this until they add it, you can use the “Output PHP Function”. Add the following code to your functions.php file or use a plugin like FluentSnippet to add it.
When selecting Output PHP Function, use the following:
{echo: get_formatted_icon_field({post_id})}
Change [your-field-slug] to your field slug.
// Add font awesome
function dbnh_enqueue_font_awesome() {
wp_enqueue_style('dbnh-font-awesome', '/wp-content/themes/bricks/assets/css/libs/font-awesome-6.min.css');
}
add_action('wp_enqueue_scripts', 'dbnh_enqueue_font_awesome');
function get_formatted_icon_field($post_id) {
// Ensure the post ID is provided, if not, try to get the global post's ID
if (empty($post_id)) {
global $post;
$post_id = isset($post->ID) ? $post->ID : null;
}
if (empty($post_id)) {
// If no post ID could be determined, return an empty string.
return '';
}
// Fetch the icon class from the Meta Box field
$icon_class = get_post_meta($post_id, '[your-field-slug]', true);
// If an icon class has been set, format and return the icon HTML
if (!empty($icon_class)) {
return '<i class="' . esc_attr($icon_class) . '"></i>';
}
// If there's no icon class set, return an empty string
return '';
}
I followed the above instruction but it doesn’t work for me. What do you mean by “Change [your-field-slug] to your field slug.” Do you mean the icon id?
I should have posted an update. After the Bricks Builder v1.98 update this stopped working. I think it has to do with the code signing. I will update this solution when I have time.
I ended up switching to the SVG widget with a custom field.
@timmse Can we have any hope that this will be implemented sooner rather than later? It’s still annoying that we cannot get support for that when Metabox is officially supported by Bricks Builder.
Please, the request has been made since January. Metabox is a whole and it would be good if we had access to all the fields. For months I’ve been asking for a different way of managing icons (to be able to group them together in a single place, a bit like Oxygen). I’ve seen a lot of requests on the subject (not having fonts, font awesome or others loaded in the builder).
Really hoping this gets added in 2.0 at least, because otherwise it would seem to me like Meta Box is basically treated like a second-class citizens which I really hope isn’t true from the Bricks team.