This code snippet enables you to display a unique logo on both single posts in each category as well as the category archive page itself.
The plugin is dependent on the use of the ACF plugin ( Free or premium version ). If no unique logo is uploaded, the default custom logo added to Customize > Site Identity is displayed.
Demo Video #
Shows unique logos uploaded to each Edit Category page displaying on both single posts in that category as well as the category archive page otherwise, if none added, the default logo added to Customize > Site Identity is displayed.
Tested using the Genesis Sample child theme by StudioPress however should work without the need for modification in any Genesis child theme which supports custom logos.
Installation Steps #
There’s 2 steps :
Step 1 – Install the ACF plugin ( free or premium version ) and import the acf.json file using the Custom Fields > Tools > Import File like you see in this screenshot :
Step 2 – Copy ( without the opening PHP tag ) & paste the PHP code to the end of your child themes functions.php file.
You can then upload different logo’s on any Edit Category screen as seen in the demo video.
慕慈 蕭 says
hi. above is our website question. we added acf and category can upload logo. but our category page logo can’t change. How can we do right now?
ps. we already paste functions.php
Brad Dalton says
Jenny. You’ve asked this question 3 times. Once via email, once via Facebook and here in the comments. This code changes the logo on single posts in each category NOT on the category archive page. To do this, you’ll need to use code like this or this