Support

Account

Home Forums General Issues Advanced Custom Fields in a Custom Text Widget Reply To: Advanced Custom Fields in a Custom Text Widget

  • Hi @jboveri

    I can see 2 issues with your code:

    1. You use a variable called $author_id multiple times, yet it is not defined anywhere.
    2. You use the_field without specifying a $post_id param. This is fine if you are within the loop, but I beleive your code will not have access to the global $post object, so it won’t work. You may need to add global $post above your code, or use a function to find the ID and then use it in your the_field calls.

    Does that help?