Home › Forums › Add-ons › Options Page › Insert logo in all pages from options
Using the plugin ACF I want to Insert logo in all pages from options pages.
I can not get the image url
This is my code:
<?php $logo = get_field( ‘logo’, ‘option’ ); ?>
<?php if ( $logo ) : ?>
 ” alt=”<?php echo $logo[‘alt’]; ?>” />
<?php endif; ?>
What is the right method? thank you

Hi @simow
It is possible you have not set the return value of the field to return the url.
Kindly check and let me know.
I tried:
– array and returns only a number
– url and returns only a number

Hi @simow
Could you please provide me with temporary admin credentials in private reply so I can check it up for you?
Also, Could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Fifteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue. This will make sure that there’s no custom function from your plugins or theme that caused this issue.
Thanks!

Hi @simow
It seems that the return value is correct, but the image field is not working only on the category page. It’s possible that your theme or plugins have a function that is modifying the query for your category page.
Could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Fifteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.
Thanks!
The topic ‘Insert logo in all pages from options’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.