How to use an ACF image field from option page to assign to header logo source?

Hi
I have an ACF option page (My company) where the client fills his company data.
We have an image field to load his comany logo.

I need to assign this field as image source in image elementt in header and footer.
When I assign my field, no matter if my ACF field return table or url field, briocks says no data were found.

How to solve this ?

Thank you in advance

Hi @10gital,

I just created an ACF option page through ACF Pro (not the option-page add-on) to test your issue.

I created two fields, one text field and one image field.
I called both fields on an header template and it perfectly works from my side.

I don’t know where the problem might comes, but one possible reason could be that you create a CPT Option without using the ACF option function ?

Have a great day,
Thomas

Hi Thomas,
Do you mean creating option page like that instead of using plug in ACF Extended ?

<?php
if (function_exists("acf_add_options_page")) {
    acf_add_options_page([
        "page_title" => "Ma société",
        "menu_title" => "Ma société",
        "menu_slug" => "ma-societe",
        "capability" => "edit_posts",
        "redirect" => false,
        "post_id" => "options",
        "update_button" => __("Enregistrer", "acf"),
        "position" => "2.1",
        "updated_message" => __("Données mises à jour", "acf"),
        "icon_url" => "dashicons-store",
    ]);
}

Hi @10gital,

Glad to see more french speaking persons coming along here :slight_smile:

Regarding your question, yes. I was thinking about using this specific function instead of plugin. At least, it totally works when I used it this method on the example above to test your issue.

Tell me if it helps

A très bientôt sur le forum :wink:
Thomas