![]() |
Basically, I'm trying to figure how to use conditional tags to change the logo for certain categories on my site.
I have a main logo but for category "shirt" for example, I would want another logo shown for instance.
I know the answer is probably easy but can't seem to Google what I'm looking for, which is why I'm posting here.
Here's the code in my template where logo appears:
That's pretty much all I got for right now. Thanks for any assistance you can give me. Solution - 1for category page, this should work but you need something else on the product page... is_product_category() will return false there... You can add is_product() to check if it's product page... then use has_term to check for product categories. https://codex.wordpress.org/Function_Reference/has_term Solution - 2Good afternoon, Firstly, we need to see the code of porto_logo() in order to see if there is some hook available there. I am going to look for this code into some porto theme. Solution - 3Are you using child theme ?? If you want I can code this for you.. Please let me know and contact me at - [email protected] |
Wordpress |
Type: | Code Example |
Category: | Coding |
Sub Category: | Code Example |
Uploaded by: | Admin |
Views: | 14 |