Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACF Options page fields don't show nothing. #5329

Closed
bentalgad opened this issue Aug 7, 2018 · 2 comments
Closed

ACF Options page fields don't show nothing. #5329

bentalgad opened this issue Aug 7, 2018 · 2 comments
Labels
bug Indicates a bug with one or multiple components. status/merged Indicates when a Pull Request has been merged to a Release.

Comments

@bentalgad
Copy link

ACF Options page fields don't show nothing. tested with two different sites (latest version of Wordpress and Elementor).

@levi-beers
Copy link

levi-beers commented Aug 7, 2018

Expanding betalglad's report

I had the same issue where no field types would work in Elementor, however I had to add this to my functions.php and recreate my fields under "Options" that becomes available on WP dashboard

if( function_exists('acf_add_options_page') ) { acf_add_options_page(); }

When you do that, Text fields work when you use a Heading or regular Text widget and select Dynamic, then ACF Field, then click the "wrench" icon. However, no other types of fields work aside from text. Specifically "image" and "url" --

Bug Report

Theme: OceanWP (but also happens with all others I've tested, Twenty Seventeen, etc)

Issue 1: When using any widget with "link" option (icon, button, etc), using dynamic ACF URL field data from options page does not work.
Issue 2: When using "image widget", no image shows when "ACF image field". I've tried returning image data as all 3 options (array, id, & url).

ACF Pro version 5.7.1
Elementor PRO 2.1

My options settings (type URL)
options_settings

Elementor shows field is available, however when viewed link doesn't show. Happens same with an image field.
elementor_pro_2_1_editor

@bainternet bainternet added bug Indicates a bug with one or multiple components. status/has-pr Indicates that an Issue, or Discussion has a companion Pull Request awaiting to be merged. labels Aug 9, 2018
@arielk arielk closed this as completed Aug 12, 2018
@arielk arielk added status/merged Indicates when a Pull Request has been merged to a Release. and removed status/has-pr Indicates that an Issue, or Discussion has a companion Pull Request awaiting to be merged. labels Aug 12, 2018
@rozuja
Copy link

rozuja commented Mar 7, 2023

I'm still having this issue. as 2023
Wordpress 6.1.1
Elementor 3.11.4
ACF 6.0.6

`
if( function_exists('acf_add_options_page') ) {

acf_add_options_page(array(
	'page_title' 	=> 'Whatsapp Options',
	'menu_title'	=> 'Whatsapp Options',
	'menu_slug' 	=> 'whatsapp-options',
	'capability'	=> 'edit_posts',
    'post_id' => 'admin_whatsapp_options',
	'icon_url' => '/whatsapp/icon-whatsapp.png',
	'redirect'		=> false
));

}

function my_acf_add_local_field_groups() {

acf_add_local_field_group(array(
	'key' => 'general_config',
	'title' => 'Configuraciones de Whatsapp',
	'menu_order' => 0,
    'position' => 'normal',
    'style' => 'default',
    'label_placement' => 'top',
    'instruction_placement' => 'label',
    'hide_on_screen' => '',
	'fields' => array (
		//Mensaje
		array (
			'key' => 'wasafield_message',
			'label' => 'Mensaje',
			'name' => 'mensaje',
			'type' => 'text',
			'instructions' => 'Mensaje de todos los botones de la página',
            'wrapper' => array (
                'width' => '50%',
            ),
		),
		//Codigo País
		array (
			'key' => 'wasafield_countrycode',
			'label' => 'Código de País',
			'name' => 'countrycode',
			'type' => 'number',
			'instructions' => '57, 21, 31',
            'wrapper' => array (
                'width' => '10%',
            ),
		),
		//Telefono
        array (
			'key' => 'wasafield_phone',
			'label' => 'Teléfono',
			'name' => 'telefono',
			'type' => 'number',
			'instructions' => 'Teléfono de todos los botones de la página',
            'wrapper' => array (
                'width' => '30%',
            ),
		),
		//Colores
		//Color de fondo
		array (
			'key' => 'wasafield_backgroundcolor',
			'label' => 'Color de Fondo',
			'name' => 'color_fondo',
			'type' => 'color_picker',
			'instructions' => 'Color de fondo solo para el botón flotante',
            'wrapper' => array (
                'width' => '10%',
            ),
		)
	),
	'location' => array (
		array (
			array (
				'param' => 'options_page',
				'operator' => '==',
				'value' => 'whatsapp-options',
			),
		),
	),
));

}

add_action('acf/init', 'my_acf_add_local_field_groups');
`

This is my actual code. Nothing strange 1 admin panel and a group of 4 fields

image

I tried deveral options but still doesn't render as if those global variables doesn't exists for elementor.

  1. Added via php the fields (Not working)
  2. Added via acf interface a field to the options panel (Not working)
  3. Tried rendering the data with Jet Engine Dinamic Field (Not Showing)
  4. Tried rendering the data with a normal text field with a dynamic data (Not SHowing)

3 and 4 you can see them on the screen shot i left on this post.

All the fields apparently shows on the list as you can see on the screenshot but doesn't renders anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates a bug with one or multiple components. status/merged Indicates when a Pull Request has been merged to a Release.
Projects
None yet
Development

No branches or pull requests

5 participants