Support

Account

Home Forums General Issues Displaying acf values in Elementor using HTML Reply To: Displaying acf values in Elementor using HTML

  • Thanks for your help nisasafdar

    Unfotunately that solution does not work and I think it might be because Elementor does not all PHP to run in an HTML widget.
    As an alternative I tried to create a shortcode in the functions.php file but I am not having success with that either. Here is my code:

    // Add Shortcode to use acf field value in scrolling marquee
    function marquee_text_shortcode( $atts , $content = null ) {
    $marquee_text = get_field(‘marquee_txt’);

    return ‘‘ . $marquee_text . ‘‘;
    }
    add_shortcode( ‘scroll_txt’, ‘marquee_text_shortcode’ );

    I have tried using [scroll_txt] in he shortcode widget and in a text box widget but only the name of the shortcode is displayed.

    Any other suggestions?