Metabox icon field

I have created a group on a settings page using a metabox.
The group consists of the following items:

  • social links
    • icon
    • name
    • link

As shown in the image, I can see the icon and name on the list, but I cannot see the icon. I also attempted to add it manually, but was unsuccessful.


icon element is pretty new to metabox. I suspect that is because of that.
I leave here the link.

Thak you

7 Likes

Hi Marco,
Thanks so much for your report!

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.

Best regards,
timmse

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.

3 Likes

Thank you, Stefan!

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.

Have a nice day!

3 Likes

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. :wink:
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.

7 Likes

Hi @timmse,

I wanted to check in on the status of this. As you suggested, @marcorubiol quickly filed it formally on the idea board. However as we know, the process for approving ideas is a slow one and this still isn’t visible to be voted on yet a week later. (related: [WIP] Concerns around the Ideation process. How are new requests handled in the Idea Board tool for Bricks Builder?).

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. :crossed_fingers:

2 Likes

Seems we will have to do the idea board tour.

1 Like

Upvoted also, but can’t see this being implemented anytime soon if we gotta go through the whole bote process.

@timmse can we get the docs updated to reflect that the Meta Box integration is not wholly complete is and missing certain fields please.

1 Like

Adding my support to request for Metabox icon field

1 Like

I voted for this.

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 '';
}

2 Likes

@designbynh Hi there!

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?

Hi Fred,

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.

1 Like

Ah oky, thanks for the reply!