Support

Account

Home Forums Front-end Issues Issue with ACF shortcodes

Solving

Issue with ACF shortcodes

  • Hello,

    I need to display company information on the same line, like this :
    Company – address, zipcode city, Country

    So I used ACF shortcodes like this :
    [acf field='="company"] – [acf field='="address"], [acf field='="zipcode"] [acf field='="city"], [acf field='="country"]

    But when I view the page, here’s what’s displayed :
    – , ,

    Values are ok because if I choose to use shortcode widget, the company displays ok.

    Could you please help me ?

    I already tried to deactivate all plugins but it didn’t help.

    Regards

  • first, where are these values saved, on the current post? options? something else?

    second is the the actual text you are entering for the shortcode?

    
    [acf field='="company"]
    

    or was the extra =' an error when you added it here?
    this should be

    
    [acf field="company"]
    
  • Yes it was a typo. The text is :

    [acf field="company"]
    The values are saved on the current post.
    When I use elementor shortcode widget, the company displays ok. And the other fields also.
    But when I try to display them using the shortcodes, it displays empty values.

  • To be more accurate, here’s the content of the text widget :
    [acf field="company"] – [acf field="address"], [acf field="zipcode"] [acf field="city"], [acf field="country"]

  • Given the information I have I don’t know any reason that the shortcodes would not work in a text widget if that text widget is use on the same page as the shortcode widdget.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.