Register my fields with the carbon_register_fields hook
-
Hi,
I just have discovered Carbon Fields and tried to create a simple widget to test this plugin.
I have followed the instructions in the documentation (“Getting Started” chapter) to register my fields with the carbon_register_fields hook but it doesn’t works.
I did this in a plugin so the code below is in my main plugin php file:
add_action('carbon_register_fields', 'crb_register_custom_fields'); function crb_register_custom_fields() { include_once( plugin_dir_path( __FILE__ ) . '/includes/widgets.php'); }
On the other side, if I do a simple include like this:
include_once( plugin_dir_path( __FILE__ ) . '/includes/widgets.php');
It’s works.
What I did wrong to register my fields with the “crb_register_custom_fields” hook as explained in the documentation?
You can download my little plugin to check the code by following this link
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Register my fields with the carbon_register_fields hook’ is closed to new replies.