Skip to content

Shortcode Bug #85

Open
Open
@YanMetelitsa

Description

@YanMetelitsa

Greetings!

I noticed, that on some sites the [acf] shortcode does not work, while on some sites it works (with the same versions of WordPress and SCF).

When trying to output shortcode [acf field=”..."], an empty string is displayed. Everywhere – in page/post content, plugins etc..

I checked if the shortcode is registered using $GLOBALS[ 'shortcode_tags' ] – shortcode [acf] is registered.

At the same time, if you recreate the shortcode, it starts working correctly:

add_shortcode( 'acf', function ( $atts ) {
	$value = apply_filters(
		'acf/format_value', 
		get_field( $atts[ 'field' ], $atts[ 'post_id' ] )
	);

	return $value;
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions