Questions tagged [carbon-fields]

Carbon Fields can be installed through composer (composer require htmlburger/carbon-fields).

The library supports PHP 5.3+ and uses PHP namespaces.

The main components of the library are:

  • Container – represents and controls a group of fields.
  • Field – represents a single field.
  • Data Storage – controls the underlying data storage for field values.
24 questions
0
votes
0 answers

Wordpress Carbon Fields Media Gallery for Gutenberg Blocks

I got the code below to work for a container with the html in a Wordpress page template. How does this work for Block (a Gutenberg block)? For templates it worked with the following in functions.php. (Got it…
0
votes
0 answers

Carbon Fields add variables to rich text

I try to get variable in my rich text Field::make('rich_text', 'contact_plugin_message1', __('Bericht bevesteging klant')) $werknemeremail = $_POST['werknemeremail']; $message = get_plugin_options("contact_plugin_message1"); Html i insert in…
0
votes
1 answer

Carbon Fields - Selected terms are not associated with a post

I'm starting to use Carbon Fields (with Wordpress) and I'm having a problem. I installed Wordpress v.6.0.1 on localhost (Windows 10, OpenServer, PHP 8.0, MySQl 8.0); Then I installed Carbon Fields using composer. I created several categories and…
0
votes
1 answer

Carbonfields, undefined number of elements

I am using carbon fields for a wordpress plugin. The problem is that in the options there should be an undefined number of inputs. For instance (this is a simplification), in the settings there is "people", where the developer can specify more than…
0
votes
0 answers

Javascript API not working for Carbon Fields?

$(document).on('carbonFields.apiLoaded', function(e, api) { // Get the current value in the 'crb_text' field var value = api.getFieldValue( 'crb_text' ); console.log(value); }); As mentioned in the doc…
Rehan Adil
  • 47
  • 4
0
votes
2 answers

How show media gallery | carbon fields wordpress

I using Carbon Fields in Wordpress. I have a problem, beacause I can not show media gallery. My code in functions.php function crb_attach_post_meta_aboutus() { Container::make( 'post_meta', __( 'Singlebramy', 'single' ) ) ->where(…
0
votes
1 answer

Separate fields array with container in theme options ( Carbon Fields )

Is it possible to separate those two add_fields() and wrap each other in container with a title so they look nicer in theme options? add_action( 'carbon_fields_register_fields', 'crb_attach_theme_options' ); function crb_attach_theme_options() { …
0
votes
1 answer

Using Carbon Fields within a Namespace

I am using a WordPress Framework and need to use Carbon Fields. The problem is that everything is within a lib directory, and then separated into more directories such as classes, functions, shortcodes, plugins, etc. these are then namespaced…
Stuart
  • 45
  • 8
0
votes
0 answers

Wordpress backoffice doesn't import Carbon fields javascript packages with Bedrock roots stack mu-plugins

I’m setting up a new WordPress project with Trellis roots stack. I tried an installation with carbon fields as must used plugin. But I can't make it worked. The containers shows up but impossible to have some fields displayed. I have tried many…
MrGlox
  • 26
  • 5
1
2