Make Logo random

Hello dear Support Team,

in my child-theme on Site, I would like the logo not to be always the same picture, but with every new page reload a random picture out of a folder where I’ve uploaded my logos on the server. Could you give me a hint as to what code I need to call the logo picture from a specific folder? I can then figure out by myself how to make it random.

With best regards,
20something

Hi 20something,

I hope you are well today and thank you for your question.

The logo is displayed using the following the_custom_logo function

So you can use its following filter to change it.

Best Regards,
Movin

Hey Movin,

thank you for your help. I tried, but can’t manage to do what I want to do, but thanks to you I know now where to look and will continue to try!

With best regards,
20something

Hey there,
Hope you’re doing well

So sorry you didn’t get it done, however, I’m glad you at least have an idea.

Please feel free to reach out if you need help with anything else.

Best Regards,
Support

If you are not a developer then you can consider hiring a developer to develop it for you. You can hire a developer from any freelance site. Colorlib recommends the developer https://www.upwork.com/freelancers/~011652ffec8865c6d5

Hey there,
Hope you’re doing well today

Did you manage to get this issue resolved?

Just asking so that I may provide some additional support, or close the ticket.

Please let me know.

I look forward to your reply :slight_smile:

Best Regards,
Support

Hello,

I couldn’t manage yet, unfortunately. Perhaps you could push me in a direction as to what to do with get_custom_logo?

I can’t manage to get it to return an image from the direction where I’ve uploaded them on my server.

With best regards,
20something

Just add the array containing all logo image URLs in the get_custom_logo filter function then use rand function PHP rand() Function to return random index key of this array and then return the logo image URL of that index.

I managed it! It looks just like I wanted now! Thank you so much for your great support on all my issues! I’m gonna stick to your themes and recommend them to others!

With best regards,
20something

You are most welcome here :slight_smile: