Home Forums General Issues ACF and Widgets Reply To: ACF and Widgets

  • I don’t know exactly what you want but here is what i think it is:

    You can assign the custom forms to widgets, unfortunately it’s only possible on ACF5.

    First step is creating your widget:

    class CustomWidget extends WP_Widget {
    	function __construct() {
    			'custom_widget', // Base ID
    			__('CustomWidget', 'text_domain'), // Name
    			array( 'description' => __( 'Some CustomWidget', 'text_domain' ), ) 
    // register Foo_Widget widget
    function register_foo_widget() {
        register_widget( 'CustomWidget' );
    add_action( 'widgets_init', 'register_foo_widget' );

    After that, on the menu go Custom Fields > Custom Fields > Your Field > At the Location tab (Rules) choose on the first select “Widget” after that select “is equal to” and the name of your widget, in this case: “CustomWidget”.

    After that save your field, go to theme > widget and drag and drop your widget on the area that you want.

    I’m sending 2 pictures, on of the configuration field, and the other is the widget panel.

    Hope this helps you! =D