Questions tagged [acf-gutenberg]

16 questions
7
votes
4 answers

Show preview image for custom Gutenberg blocks

I've created a batch of custom ACF gutenberg blocks and now trying to assign a preview image. Issue: Getting the preview image to show The below image here shows a paragraph component which is a default block. You can see on the right hand side,…
Freddy
  • 683
  • 4
  • 35
  • 114
5
votes
1 answer

How to enable duplicate functionality on ACF Repeater

I'm using ACF for building custom Wordpress configuration options (inside custom options pages, settings, CPTs, Gutenberg blocks etc), for more than 5 years. I know there's an option in repeater fields to duplicate rows, but how can I enable it? All…
RBFraphael
  • 367
  • 1
  • 3
  • 13
2
votes
2 answers

Gutenberg block CSS does not apply to preview in template parts editor

I'm trying to add support for template parts to my WordPress theme. I have a block with a stylesheet and a script and everything works fine. However, in the template part editor (Design -> Template parts), my styles are loaded but they don't apply…
2
votes
1 answer

Creating page and post specific ACF Gutenberg blocks

I'm creating custom ACF Gutenberg blocks my a site and have successfully managed to register my own blocks. Now, I have a custom post type called Blog. I do not want blog to show all my ACF Gutenberg blocks, I want to create a separate batch for…
Freddy
  • 683
  • 4
  • 35
  • 114
1
vote
1 answer

Wp Block default background color don't work

I've found this really wierd bug where if I set the block.json to have a default background color, like this: "attributes": { "backgroundColor": { "type": "string", "default": "rose-red" } } ( "rose-red" is…
1
vote
0 answers

ACF field data not registering in block render

I have created a custom block in WordPress, using an ACF registered block. The purpose of the block is to allow the addition of either a regular post, or a custom post type post to a page. The block works as expected with a regular post. However, no…
anne
  • 11
  • 1
1
vote
1 answer

Sending data from template to script in gutenberg acf block

I am registering custom block with ACF (acf_register_block_type) with a separate JavaScript file. In the php template I have some ACF data. Is it possible to send those data to the JavaScript? There are multiple instance of the same block in one…
1
vote
1 answer

ACF Blocks enqueue style in head

I tried to add acf block tyle via acf_register_block_type, but it is loading in footer. How to place styles in the header?
1
vote
0 answers

Get ACF gutenberg block data from custom post type

I running into some problems with ACF Gutenberg blocks. I have registered a Gutenberg block to be used in a custom post type called "Portfolio" Through a normal wp_query i can display the custom post type on the homepage. But i can not get the ACF…
1
vote
1 answer

Preview image in ACF gutenberg block

Is it possible to add an image to the gutenber block preview when using ACF to register the block ? Here's the code to register the block: acf_register_block(array( 'name' => 'bk-raisons', 'title' => __('Les…
Diezel
  • 43
  • 6
1
vote
1 answer

Wordpress Gutenberg custom columns block

I'm trying to create a custom "columns" block for Gutenberg with ACF & Wordpress, so what I want is a easy to manage columns block, where user can input some number representating the amount of wanted columns (for example, 5) and a for will create…
0
votes
0 answers

Is there a way to make Typography and Dimensions Tool Panel always available on wordpress editor?

is there a way to make the default appearance of the Typography and Dimensions Panel in the Gutenberg editor always available and open? I have been trying to change it trought the theme.json but with no success. The default behavior is to have it…
Ramate
  • 13
  • 3
0
votes
0 answers
0
votes
1 answer

How to debug Gutenberg - the editor is showing a blank page after importing content

When I edit a post that's using Gutenberg I am seeing a blank page only when I import content, it works fine before I import and the content after import is showing fine on the front end I just can't load the admin editor. I've checked all the error…
0
votes
1 answer

Gutenberg InnerBlock.Content is not being saved or rendered in the front end

I created a custom block for author-bio and i have included the social icons built-in block into my custom block after importing InnerBlocks into my block js file i have used this code in edit function:
1
2