Support

Account

Forum Replies Created

  • OK – simpler to add the shortcode directly into the .html template, just like WooCommerce works.

    Woo adds an entry directly into the wp_posts data table for their pages. The post_content field is a shortcode….

    <!-- wp:shortcode -->[woocommerce_cart]<!-- /wp:shortcode -->

    As I want to surround my block contents with my ACF extracted data I can put this markup directly into my templates.

  • @chandlerwarren I have a hack that’s working for me in the short term before I delve into looking at the feasibility of creating a native Gutenberg block or an ACF block to get a better solution.

    What I have done:

    • Created a separate .HTML template in the templates folder of my child theme folder based on single.html. Let’s say single-event.html (based on my Custom Post Type).
    • Created an empty template part in parts. Let’s say it’s called event-detail.html.
    • Then in my single-event.html template I have
      <!-- wp:template-part {"slug":"event-detail"} /-->
      where I want to render the ACF data.
    • Then from the site editor, I edit the new template part and insert a shortcode.
    • In my plugin (or in functions.php) it’s easy to add the shortcode code to use the global $post to then fetch the ACF fields and return a nice layout of my ACF fields.
      Not elegant, and probably not the preferred method. I’d like to find out how to do this properly.

  • I’m looking for a solution for this too. I’m migrating a large site from a PHP templated based theme to a block theme to leverage all the benefits of FSE as well, but this is a project blocker.

  • I think I’m seeing a related issue.
    Pre ACF Pro v5.7.0 I was able to click on the map to set a marker (admin edit page). To remove the marker I would click on the marker icon in the top right of the map. Great!!!
    But after upgrading to ACF Pro v5.7.0 the behaviour has changed. Clicking in the map only causes it to zoom in a bit. A marker does flash in the centre (and gets registered) but it does not persist on the map. I don’t know haw to remove the marker.
    The default icon on the map is now a ‘move hand’.
    It was working perfectly 2 days ago before the upgrade.

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