Support

Account

Home Forums General Issues ACF5 in widgets Reply To: ACF5 in widgets

  • Here’s how to do it-

    public function widget( $args, $instance ) {
    extract( $args );
    $widget_id = $args['widget_id'];
    $MYVARIABLE = get_field($widget_id.'_ACFFIELDNAME', 'widget');
    echo $MYVARIABLE;
    ...
    }
    
    public function form( $instance ) {
    $widget_id = $this->id;
    ...
    ?>