Support

Account

Home Forums Add-ons Options Page Insert logo in all pages from options

Solved

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!

  • This reply has been marked as private.
  • 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 problem was the theme
    Thank you

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

The topic ‘Insert logo in all pages from options’ is closed to new replies.