Custom Logo For Single Posts In Each Category & Category Page

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 :

Import Custom Field Settings

Step 2 – Copy ( without the opening PHP tag ) & paste the PHP code to the end of your child themes functions.php file.

Download Folder

You can then upload different logo’s on any Edit Category screen as seen in the demo video.

Related Code Snippets


Comments

2 responses to “Custom Logo For Single Posts In Each Category & Category Page”

  1. 慕慈 蕭 Avatar

    https://drive.google.com/file/d/1_IX2wykxREfnCsHqiLHp9ZKeh97Psa0G/view?usp=sharing

    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

    1. 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

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.