[Support request] Use GP Hook as Gutenberg Reusable Block?

Home Forums Support Use GP Hook as Gutenberg Reusable Block?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #996877

    Hey GP Team,

    I had a question about possibly using Hooks inside of Gutenberg reusable blocks? Is it possible to display a hook several times on a certain page inside of a block? This is so that I can move it around on the page, and use it as many times as I need it. The usage idea is really for custom-styled headings that will be filled out with ACF fields on the backend WP editor, but each article will have different lengths and text so I can’t really use a consistent position for the hook. I am hoping to figure out a way that I can place it into a shortcode or Gutenberg block so I can move it around the page, or duplicate as many as I need per article.

    I’ve already tried this a few times on my own and in my research, I’ve been able to insert PHP onto a WP post using this plugin (https://wordpress.org/plugins/insert-php-code-snippet/) but then I can’t use my trusty GP display rules code that you guys gave me a few weeks ago… this would cause the shortcode to still display even though the ACF field is empty. I need to retain that functionality so everything displays cleanly in the case that the field hasn’t been filled out. What do you guys think? Any suggestions?

    Customer Support

    Hi there,

    i am not sure i fully understand the requirement regarding using ACF to output a heading. But maybe you want to look at ACF Blocks:


Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.