Support

Account

Forum Replies Created

  • So I found the Clone field from which I can reference the fields from another Field Group. It seems to be working! Now I can have Elementor take over my WP Editor and still have Flexible Fields below it so that my clients can fill in simple content without messing with carefully laid out layouts made with Elementor. One remaining issue is the render_template for the block. I now need to ask if we are in a row_layout or not.

    <?php
    
    //Normal Gutenberg Block
    $quote = get_field("quote");
    
    //See if it's really a Flexible Content Row
    if(get_row_layout() == 'gutenberg_testimonial_block'){
        $quote = get_sub_field('quote');
    }
    ?>
    <div class="acf-block-testimonial">
        <blockquote><?= $quote ?></blockquote>
    </div>

    It would be a little messy on more complicated templates.

    Does my above solution make sense or does anyone else have input on a better way?

  • The preview works for the main administrator role but not other roles (e.g. Editor and Contributor).

    My solution was to go to /wp-admin/users.php?page=roles&action=edit&role=editor and click Fields and then grant manage_options.

    I then logged in as an Editor and hid the now exposed custom fields but editing a page, clicking on “Screen Options” and unchecking “Custom Fields”.

    This is not ideal because it opens up options that other roles really shouldn’t see.

  • Thanks Elliot. How do you queue up a jquery script to only run on pages that have the flexible content fields?

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