Back to Community

How to Display Custom Fields in Blocksy Post Cards and Archives

32 threads Sep 10, 2025 ThemeBlocksy

Content

Many WordPress users leverage custom post types and custom fields to create unique content structures for their websites. A common challenge when using the Blocksy theme is figuring out how to display the values of these custom fields within the post cards on archive pages or in the post meta sections.

This guide explains why this happens and provides the most common solutions based on community discussions and available workarounds.

Why Custom Fields Don't Appear by Default

The Blocksy theme's customization options in the WordPress Customizer are designed to work with standard post metadata, such as the author, date, and categories. The interface for adding elements to post cards, found under options like Customizer → Post Types → [Your Post Type] → Card Options → Post Meta, is pre-configured for these common elements. Since custom fields can have any name and are created by users or plugins, the theme cannot automatically list every possible field in its options panel.

This is a design limitation of the theme's free version, and based on community threads, the Blocksy team has indicated that native support for selecting custom fields in the Card Options may be introduced as a premium feature in the future.

Common Solutions to Display Custom Fields

1. Using the blocksy:post-meta:items Filter (For Developers)

For those comfortable with code, the recommended method is to use a WordPress filter hook. The Blocksy theme provides a specific filter, blocksy:post-meta:items, which allows you to add custom items to the post meta output.

Example Code Snippet:

add_filter('blocksy:post-meta:items', function($items, $id) {
    // Replace 'your_custom_field' with the name of your actual custom field
    $custom_field_value = get_post_meta($id, 'your_custom_field', true);

    if (!empty($custom_field_value)) {
        $items[] = [
            'id' => 'custom-field',
            'enabled' => true,
            'label' => 'Your Label: ' . $custom_field_value
        ];
    }

    return $items;
}, 10, 2);

How to use this:

  1. Add this code to your child theme's functions.php file.
  2. Replace your_custom_field with the exact name (key) of your custom field.
  3. Replace Your Label: with the desired text you want to display before the value.
  4. Once added, the new item should appear in the list of available Post Meta elements within the Blocksy Customizer for you to enable.
This method is powerful because it integrates your custom field directly into the theme's built-in system.

2. Direct Template Modification (Advanced)

Another approach is to modify the template file that renders the post cards. This is a more advanced method and should always be done within a child theme to prevent your changes from being overwritten by theme updates.

You would need to locate the appropriate template file (often in template-parts/) and use standard WordPress functions to fetch and display your custom field value where desired.

Example:

<?php echo get_post_meta(get_the_ID(), 'your_custom_field', true); ?>

The complexity here is identifying the correct file and placement without breaking the existing design. This method offers maximum flexibility but requires a higher level of technical skill.

Important Considerations

  • Child Theme: Always use a child theme when adding custom code to your website. This ensures your modifications are safe during theme updates.
  • Plugin Conflicts: If you are using a plugin to manage custom post types or fields, ensure it is compatible with the latest version of WordPress and Blocksy.
  • Specificity: The solutions above are generally for adding fields to post meta. Displaying a custom field elsewhere in a card (e.g., in the title) would require a different approach, potentially involving more complex template edits.

While displaying custom fields in Blocksy requires a bit of custom code, the provided filter hook offers a robust and supported method for achieving this functionality. For users unable to implement code-based solutions, watching for future theme updates that may include this feature in the Customizer is advised.

Related Support Threads Support