Support

Account

Forum Replies Created

  • @perrelet can you take a look at the new documentation here at https://www.advancedcustomfields.com/resources/whats-new-with-acf-blocks-in-acf-6/ to see if it helps.

    There’s a quote that may or may not be applicable to your question:

    WordPress 5.9 users who use Block Styles may have noticed that the ACF registration of styles was not applied to those previews, which is why all ACF Block users should migrate their blocks to use those WordPress provided methods of asset loading.

  • Mine was resolved just like @paulg stated. But perhaps you can try this plugin https://hookturn.io/downloads/acf-theme-code-pro/ if you’re not already aware. It automatically generates a php code immediately after you create AFC fields. The tutorial has very clear instructions

  • Thank you for the reply but this is a backend issue so I am not sure the inspect element would be of any help. I opened a support ticket and they got back to me once without any solution. They promised to get back to me again and they never did.

  • RESOLVED
    The issues were much more beyond the ACF plugin. So, for anyone who may be having similar issues, I used the define( ‘WP_DEBUG’, true );
    define( ‘WP_DEBUG_LOG’, true ); in the`config.php file which revealed the true the coding issues in the function.php file and then the template. It took me a bit to clean up the codes and the fields were displaying as expected.

  • Hello, were you able to resolve this? I am having the exact same issue.

    Thanks!

  • Hello,

    Were you able to resolve this? I have the same issue and I have searched everywhere for a solution but so far no luck.

    Thanks

  • I don’t know if you resolve this already but I have a similar problem and this is what I used the ID variant for this line of code:

    <?php echo wp_get_attachment_image( $image, 'full' ); ?>

    This finally worked for me.

  • Apologies if this comes as duplicate posts. I have posted twice but did not go through.

    I got a white editor page after I added the second register block. I got the editor back when I removed it and I am not sure what’s wrong as written. I will appreciate some help.

    function register_acf_block_types() {
    
       // register a testimonial block.
       acf_register_block_type(array(
          'name'              => 'testimonial',
          'title'             => __('Testimonial'),
          'description'       => __('A custom testimonial block.'),
          'render_template'   => 'template-parts/blocks/testimonial/testimonial.php',
          'category'          => 'formatting',
          'icon'              => 'admin-comments',
          'keywords'          => array( 'testimonial', 'quote' ),
       ));
    	
    	// register a testimonial block.
       acf_register_block_type(array(
          'name'              => 'landing_page_content',
          'title'             => __('Landing Page'),
          'description'       => __('A custom landing page block.'),
          'render_template'   => 'template-parts/blocks/landing/page_landing.php',
          'category'          => 'formatting',
          'icon'              => 'dashicons-format-aside',
          'keywords'          => array( 'landing', 'card' ),
       ));
    }
    
    // Check if function exists and hook into setup.
    if( function_exists('acf_register_block_type') ) {
      add_action('acf/init', 'register_acf_block_types');
    }
  • Phew! After days of trying to figure out what went wrong, I finally figured it out. It’s now displaying on the front end, as expected. It turns out that my template callback function is not pointing to the right template folder. That’s it!

    Thanks envy for taking the time to help.

  • Thank you again enky. The new error now is “Your site does not support the “acf/testimonial” block. You can leave this block or delete it completely.”

    Not sure if anyone has a solution to that error message.

  • Is there a difference between plugin_dir_path(__FILE__) and get_template_directory_uri ?

    I noticed that my code above was missing the path but I later added the get_template and not the plugin_dir. Perhaps I should try the other format too but not sure if it matters

  • No only the page footer content. Also the html from the template is not rendering. I’ve used the same template a few times outside Gutenberg so I must be doing something wrong in Gutenberg.

Viewing 12 posts - 1 through 12 (of 12 total)