sorry, wrong plugin…
]]>It would be great to be able to instantiate a widget directly, without using an area. This would allow ACF to select a specific widget type or similar to display in a repeater pattern.
https://www.ads-software.com/plugins/advanced-custom-fields-widget-area-field/
]]>I wanted to make sure this is possible before even attempting to use this plugin(top under navigation and under social icons, top right). I don’t know php, so any tips would be extremely appreciated!!! Mockup of what I want to do: https://bit.ly/1zruewl (areas in red boxes)Thank you!!!
https://www.ads-software.com/plugins/advanced-custom-fields-widget-area-field/
]]>Hello,
i have installed the plugin on WP 4.0 and ACF Pro, and i got an error:
Fatal error: Class ‘acf_field’ not found in /home/szek/public_html/fw2k15/wp-content/mu-plugins/advanced-custom-fields-widget-area-field/widget-area-v4.php on line 4
i have deleted the plugin as a result of this error (i assumed it doesnt work with ACF Pro), but now every time i save a Page or Post that has ACF Fields, i get this message – although the folders and files are deleted from the server.
Has something been saved to the database that could cause this error? i couldn’t find anything.
Please help, it’s annoying to get this error on every save:(
Also, do you plan to make the plugin compatible with ACF Pro?
thank you,
andi
https://www.ads-software.com/plugins/advanced-custom-fields-widget-area-field/
]]>This plugin is great and is really close to what I needed. I did have to modify it a little bit to make it work. The current plugin uses dynamic_sidebar() function which is outputting content outside of your $value variable and isn’t returned with the function.
By adding ob_start() and ob_get_contents you can save this output and return it properly within your div. (If you look now, the <div id=”secondary”> gets displayed after the sidebar)
Here is the final code change to make this work so that ACF functions get_field (returns the html) and the_field (displays the html) work properly.
<br />
function format_value_for_api($value, $post_id, $field)<br />
{<br />
$value = '';<br />
if ( is_active_sidebar( $field['value'] ) ) :<br />
$value .= '<div id="secondary" class="widget-area" role="complementary">';<br />
ob_start();<br />
dynamic_sidebar( $field['value'] );<br />
$value .= ob_get_contents();<br />
ob_end_clean();<br />
$value .= '</div><!-- #secondary -->';<br />
endif;<br />
return $value;<br />
}<br />
https://www.ads-software.com/plugins/advanced-custom-fields-widget-area-field/
]]>Hi there
First of all special thx for your great Plug-In cause i really need it in my project.
I think that ACF: Widget Area Field has a such a kind of bug with ACF: Repeater Field . I had the same problem with ACF: Font awesome but it has fixed some days ago and now ACF: Font awesome is working with ACF: Repeater Field really well.
so would u plz help me and give me some information?
thx a lot:)
https://www.ads-software.com/plugins/advanced-custom-fields-widget-area-field/
]]>hello.
I’v modified your plugin so i could not echo widget area but return wigdet are name, here’s the code:
line from 88
<?php // new field for returning just name of sidebar ?>
<tr class="field_option field_option_<?php echo $this->name; ?>">
<td class="label">
<label><?php _ex("Return",'acf_field_widget_area return type','acf'); ?></label>
</td>
<td>
<?php
do_action('acf/create_field', array(
'type' => 'radio',
'name' => 'fields['.$key.'][return]',
'value' => $field['return'],
'choices' => array(
1 => _x("Widget area (html)",'acf_field_widget_area return type widget area','acf'),
0 => _x("Widget area name",'acf_field_widget_area return type widget area name','acf'),
),
'layout' => 'horizontal',
));
?>
</td>
</tr>
and return for api function compleately
function format_value_for_api($value, $post_id, $field)
{
$value = '';
if( $field['return'] ){
if ( is_active_sidebar( $field['value'] ) ) :
$value .= '<div id="secondary" class="widget-area" role="complementary">';
dynamic_sidebar( $field['value'] );
$value .= '</div><!-- #secondary -->';
endif;
} else {
$value = $field['value'];
}
return $value;
}
Hope these will be in your plugin, becouse i need to use sidebar with my own html markup and classes.
https://www.ads-software.com/plugins/advanced-custom-fields-widget-area-field/
]]>Hello.
I’m russian speaking person and i create websites for russian peoples and they don’t like (and understand neader) English language.
So, for tranlating your plugin plese fix line 113 in your’s widget-area-v4.php
echo '<option value="null">' . _x(' - Select - ','acf_field_widget_area select null', 'acf') . '</option>';
and later i’ll write to you some extra options that must be in your plugin (like return the value of selected area (so i could use it by my self) ).
https://www.ads-software.com/plugins/advanced-custom-fields-widget-area-field/
]]>