Gutenberg Custom Fields... wait what?

Overview

Gutenberg Custom Fields

Gutenberg Custom Fields allows you to control the content of the Gutenberg edit screen by creating pre-filled templates.

Navigate to the "GCF" admin page, create a new template, select a post type and add fields as you wish.

The Gutenberg Editor will be pre-filled with the corresponding post type's template.

Documentation

Documentation can be found here. If you don't find the answers you're looking for, submit an issue.

Comments
  • Does is not output the content on front-end yet?

    Does is not output the content on front-end yet?

    I am testing out this awesome plugin. First congrats on the Idea.

    I have created a test template with an image and a couple of other fields, assigned to "posts". Template appear & works fine in Guttenberg editor. However, it doesn't output the content on the front-end if you view the page once published/saved draft.

    Am I missing something? Do the developers need to output these custom data like we used to do so with custom meta fields?

    opened by munirkamal 7
  • Should this plugin work with the Pods Framework?

    Should this plugin work with the Pods Framework?

    On a fresh install of WP 4.9.8, using the twentyseventeen theme, and using the following plugins:

    • gutenberg 3.6.2
    • gcf 1.5.5
    • pods 2.7.9

    I create a new GCF template. My pods show up as a post type to use it with, but the fields I create in GCF don't show up when adding or editing posts of the types created by Pods. If I switch to the default Posts or Pages post type, the fields from GCF show up, but when I switch back to my Pods post type, the fields are no longer visible.

    Do you know if these fields should be expected to work with post types created by the Pods plugin? Also, to be clear, I'm only concerned with seeing the fields in the administrative backend.

    opened by ghost 3
  • Multiple Templates for a given post-type

    Multiple Templates for a given post-type

    In my current use case I'm using multiple CPT's to create posts of differing fixed content layouts and features. I can see moving to Gutenberg I can create the same effect using templates. However, what would be really nice would be if I could assign multiple templates to a given post type and have the user select the appropriate content structure to be used as differing choices of static layout.

    However right now GCF seems to only support one template per post type; you can set up multiple templates ok but there does not seem to be a mechanism for the user to select the template to use. Ideally for example, when they select Add New, I'd like for there to be a sub-menu where they can select the template they want to use. I'd also like to restrict the templates that are available based on the member role.

    Is this something that can be done in GCF, am I missing something, or should this be raised with the Gutenberg team direct?

    opened by Venutius 3
  • WordPress 6.0 + Custom Post Type

    WordPress 6.0 + Custom Post Type

    Does this plugin work for newer versions of WordPress and Custom Post Types?

    It seems to be fine when using Post and Page types but I can't seem to get it to work for a custom post type.

    The post type shows up on the section dropdown when setting up the fields but not in the editor (unless it's a page or post)

    function register_project_type()
    {
        $args = [
            'label'  => esc_html__('Projects', 'text-domain'),
            'labels' => [
                'menu_name'          => esc_html__('Projects', 'text-domain'),
                'name_admin_bar'     => esc_html__('Project', 'text-domain'),
                'add_new'            => esc_html__('Add Project', 'text-domain'),
                'add_new_item'       => esc_html__('Add new Project', 'text-domain'),
                'new_item'           => esc_html__('New Project', 'text-domain'),
                'edit_item'          => esc_html__('Edit Project', 'text-domain'),
                'view_item'          => esc_html__('View Project', 'text-domain'),
                'update_item'        => esc_html__('View Project', 'text-domain'),
                'all_items'          => esc_html__('All Projects', 'text-domain'),
                'search_items'       => esc_html__('Search Projects', 'text-domain'),
                'parent_item_colon'  => esc_html__('Parent Project', 'text-domain'),
                'not_found'          => esc_html__('No Projects found', 'text-domain'),
                'not_found_in_trash' => esc_html__('No Projects found in Trash', 'text-domain'),
                'name'               => esc_html__('Projects', 'text-domain'),
                'singular_name'      => esc_html__('Project', 'text-domain'),
            ],
            'public'              => true,
            'menu_icon' => 'dashicons-format-gallery',
            'exclude_from_search' => false,
            'publicly_queryable'  => true,
            'show_ui'             => true,
            'show_in_nav_menus'   => true,
            'show_in_admin_bar'   => true,
            'show_in_rest'        => true,
            'capability_type'     => 'post',
            'hierarchical'        => false,
            'has_archive'         => true,
            'query_var'           => true,
            'can_export'          => true,
            'rewrite_no_front'    => false,
            'show_in_menu'        => true,
            'supports' => [
                'title',
                'editor',
                'thumbnail',
                'custom-fields'
            ],
    
            'rewrite' => array('slug' => 'project'),
        ];
    
        register_post_type('project', $args);
    
    }
    
    add_action('init', 'register_project_type');
    
    opened by timarney 2
  • Ability to lock fields to top and bottom of content, but allow the user to make blocks in-between

    Ability to lock fields to top and bottom of content, but allow the user to make blocks in-between

    This feature would be useful for custom single post templates that have a predefined format for the top and bottom of their blog pages. Here are two possible implementations:

    • First, as described in the title:
    1. Select 'split' lock mode.
    2. The GCF template field creation area splits into two areas corresponding to the top and bottom of the Gutenberg editor.

    In Gutenberg, users would be able to move the blocks they create in-between, but not move their blocks above or below the header and footer custom fields respectively, so as to preserve their top and bottom position.

    gutenberg1

    • Second: Creating a new field type that acts like a nested Gutenberg. gutenberg2
    opened by zaksadiq 2
  • Fields are not displaying on the front end

    Fields are not displaying on the front end

    I create a fieldset, assign it to the post type, I enter data and it all seems fine in Gutenberg. When I visit the frontend none of the fields are visible. All the usual Gutenberg blocks will display as normal on the frontend. I expected the GCF blocks to display the same way.

    Gutenberg Version 2.7.0 GCF Version 1.5.1

    user error I'm sure.

    screencapture_03-05-2018-18-gcf-nofrontend

    opened by steveangstrom 2
  • scripts/i18n folder missing

    scripts/i18n folder missing

    Hi - I noticed that in version 1.5.0 you fixed a i18n error which works fine when I download your version 1.5.0 from GitHub but when installing it through WP-Admin the scripts/i18n folder is still missing. Looking at the SVN the folder is missing.

    GCF 1.5.0 on WP SVN ==> https://plugins.svn.wordpress.org/gutenberg-custom-fields/tags/1.5.0/scripts/ GCF 1.5.0 on your GIT ==> https://github.com/youknowriad/gcf/tree/v1.5.0/scripts

    The version on the WP plugin repo gives me the following error Warning: filemtime(): stat failed for /var/www/vhosts/website/wp-content/plugins/gutenberg-custom-fields/scripts/i18n/build/index.js in /var/www/vhosts/website/wp-content/plugins/gutenberg-custom-fields/lib/i18n-script.php on line 46

    opened by mclaurent 2
  • GCF template do not appear in existing posts

    GCF template do not appear in existing posts

    Hi Riad, It seem custom fields templates does not appear in posts published before custom fields templates creation. I'm using WP 4.9.4 with Gutenberg from the Github repo (master branch).

    opened by MarieComet 2
  • Custom Fields at the end of the page!?

    Custom Fields at the end of the page!?

    Wouldn't it be cleaner if the custom fields would be below the Gutenberg area? The fields are "just" a way to edit the post_meta at the moment so the top should reflect the site as much as it will look like on the frontend.

    opened by cfoellmann 1
  • Fields: Adding a repeater field

    Fields: Adding a repeater field

    This PRs adds a repeater field. The content of the field is saved as JSON, if you use this field make sure you json_decode its value before usage.

    This PR comes with a small redesign of the template form to accommodate the nesting aspect of the repeater field.

    closes #11

    opened by youknowriad 1
  • No block created when custom field added with GCF

    No block created when custom field added with GCF

    I have Gutenberg and GCF activated to test my site. I use custom fields extensively through the Advanced Custom Fields plugin. I tried recreating a custom field in Gutenberg Custom Fields, but no new blocks show up for the custom field when I try to create or edit a page (I chose pages for the post type for the new custom field). I thought there might be a conflict with ACF so I deactivated it, but that didn't help. Next, I deactivated all plugins except Gutenberg and GCF, but the block for the custom field I added in GCF still isn't showing up. I'm at a loss as to why I can't get GCF to work in my installation. new_post___add_new_page_ thsm_staging _wordpress gutenberg_custom_fields_ thsm_staging _wordpress

    opened by maryannk 1
  • [Featured] Option to add a Gutenberg Block instead of Custom Field

    [Featured] Option to add a Gutenberg Block instead of Custom Field

    How to add a Gutenberg block instead of a custom field?

    For example: I have installed this Custom Gutenberg Block that add the native Wordpress Featured Image: https://github.com/modularwp/gutenberg-block-featured-image

    How to add a Featured Image after title with all lock options?

    opened by rodrigoslayertech 0
  • How do I output a text field in my template?

    How do I output a text field in my template?

    I've created a new GCF template and added the text field large_title. Now I want to create a custom post page, where I can choose where to output the large_title text.

    I've tried with get_post_meta( $frontpage, $large_title ); - frontpage being the title of the template in GCF, but that didn't work. I've also tried some other combinations. How do I do this?

    opened by nreck 4
  • Deleting a block or template does not delete postmeta

    Deleting a block or template does not delete postmeta

    When a block or template is deleted, the postmeta is not deleted. This is an issue because in templates, the data will be retrieved using get_post_meta.

    Reproduce:

    • make a template
    • make a post, fill out the template and save
    • go back into the post, delete the block then save

    You can keep an eye on the postmeta table to see that it's still there or put a filter on the content to view it (at the bottom)

    There are a couple of ways of fixing:

    • delete postmeta on block deletion and delete all instances of the meta_keys used in a template on template deletion (so as not to leave orphaned uneditable/undeletable data)
    • use a dynamic render which won't show the postmeta data unless the block is there

    I think the first is the way to go as it avoids the orphaned data issue.

    Cheap and cheerful content filter:

    function mjj_filter_content( $content ){
    	$post_id = get_the_ID();
    	if( empty( $post_id ) ){
    		return $content;
    	}
    	$gcf_postmeta = get_post_meta( $post_id, 'main field', true );
    	if( empty( $gcf_postmeta ) ){
    		return $content;
    	}
    	return '<h2>' . print_r( $gcf_postmeta, true ) . '</h2>' . $content;
    }
    add_filter( 'the_content', 'mjj_filter_content' );
    
    opened by tharsheblows 3
📦 A zero-configuration #0CJS developer toolkit for building WordPress Gutenberg block plugins.

create-guten-block is zero configuration dev-toolkit (#0CJS) to develop WordPress Gutenberg blocks in a matter of minutes without configuring React, w

Ahmad Awais ⚡️ 3.1k Dec 23, 2022
Examples for extending WordPress/Gutenberg with blocks.

Gutenberg Examples Examples for extending Gutenberg with plugins which create blocks. See also: Gutenberg developer documentation Installation Gutenbe

null 1.1k Dec 29, 2022
Documents WordPress Classic Editor integration points and their Gutenberg equivalents

Gutenberg Migration Guide This repository documents WordPress Classic Editor customization points and their Gutenberg equivalents (if such exist). Its

Daniel Bachhuber 185 Nov 16, 2022
The easiest way to develop and release Gutenberg blocks (components) for WordPress

Contents Install Comparison with competition Future Plans Usage Creating a Block Install npm install gutenblock -g This is a Gutenberg plugin creator

Zach Silveira 239 Nov 11, 2022
Query gutenberg blocks with wp-graphql

WPGraphQL Gutenberg Query gutenberg blocks through wp-graphql Usage Docs Join our community through WpGraphQL Slack Install Requires PHP 7.0+ Requires

null 270 Jan 3, 2023
Scaffold plugin for creating and managing Blocks, Block Patterns, Block Styles and Block Editor Sidebars in the WordPress Block Editor (aka Gutenberg).

WordPress Block Editor Scaffold This project is a template repo for developing WordPress Blocks, Block Patterns, Block Styles and Block Editor Sidebar

Rareview 6 Aug 2, 2022
A plugin to disable the drop cap option in Gutenberg editor paragraph block. This is version 2.

Disable Drop Cap (v2) A plugin to disable drop cap option in the Gutenberg editor block editor paragraph block. Note for WordPress 5.8 With WordPress

Johannes Siipola 4 Jan 4, 2022
A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.

WP Bootstrap Navwalker This code in the main repo branch is undergoing a big shakeup to bring it in line with recent standards and to merge and test t

WP Bootstrap 3.3k Jan 5, 2023
A WordPress package for updating custom plugins and themes based on an API response from a custom update server.

WordPress Update Handler A WordPress package for updating custom plugins and themes based on an JSON REST API response from a custom update server. Ch

WP Forge 7 Oct 5, 2022
Wordpress advance plugin with multi purposes features like live chat, custom post type, custom forms, word count etc

What is this? This is wordpress plugin which is created for the multi purpose uses. How to use? Simply install the plugin. Go to the plugin settigs pa

Amir Liaqat 2 Jun 23, 2022
Wordpress wrapper to expose Carbon Fields to WpGraphQL queries.

WpGraphQLCrb A Wordpress wrapper to expose Carbon Fields to WpGraphQL queries. Important This is just the first version. There is a lot of work to be

Matheus Paiva 16 Aug 19, 2022
A PHP Class for creating Wordpress Custom Post Types easily

N.B I've released an updated version of the project to a new repository, PostTypes. WP Custom Post Type Class v1.4 A single class to help you build mo

Joe Grainger 412 Nov 25, 2022
Adds Settings to the Custom Post Type UI plugin to show Post Types in WPGraphQL

DEPRECATION NOTICE ?? Custom Post Type UI v1.9.0 introduced formal support for WPGraphQL!!! ?? With that, this plugin is being deprecated and will no

WPGraphQL 77 Aug 3, 2022
Custom WordPress theme for DotOrg

wd_s Debt Collective Theme Table of Contents Introduction Getting Started Prerequisites Quick Start Advanced Setup Development Contributing and Suppor

The Debt Collective 1 Oct 31, 2022
The PHP Shortcode Hunter, nested shortcodes and custom shortcodes

shortcode-hunter The Shortcode Hunter - PHP shortcode class, nested shortcodes and custom shortcodes Installation composer require enesakarsu/shortcod

Enes Akarsu 1 Nov 20, 2021
Word Count (Custom WordPress Plugin)

word-count (Custom WordPress Plugin) Followed a tutorial to create a plugin that adds word count infos to the frontend (Posts only). I then modified t

null 1 Feb 4, 2022
Wordless is a junction between a WordPress plugin and a theme boilerplate that dramatically speeds up and enhances your custom theme creation

Wordless is a junction between a WordPress plugin and a theme boilerplate that dramatically speeds up and enhances your custom theme creation. Some of

weLaika 1.4k Dec 9, 2022
A super simple abstraction to make creating a custom Taxonomies in WordPress a breeze

A super simple abstraction to make creating a custom Taxonomies in WordPress a breeze

Joe Grant 2 Apr 5, 2022
A custom update API for WordPress plugins and themes

A custom update API for WordPress plugins and themes. Intended to be used in conjunction with my plugin-update-checker library.

Yahnis Elsts 717 Dec 31, 2022