I would like to add a banner to each of the shop category pages. How can I do this? Is there some CSS I can apply? Also what would be the ideal banner dimensions?
So this code will look for a page with the title "Shop Categories Banner" and apply its content in the shop categories page, as can be seen here in this video demonstration:
Hi! That's excellent. Thank you for that. I am however in a situation where I want to add a banner to possible 50 or more category pages.
Would there be a easier way to do this rather than having to create multiple additional pages and then adding a code snippet to pull from each of those pages?
Hi! I love your theme.
I would like to add a banner to each of the shop category pages. How can I do this? Is there some CSS I can apply? Also what would be the ideal banner dimensions?
Any help would be appreciated. Thank you!
Hi JahMaican,
Sure you can do this, by adding the following code in functions.php:
So this code will look for a page with the title "Shop Categories Banner" and apply its content in the shop categories page, as can be seen here in this video demonstration:
https://d.pr/v/3oUVdS
Hi! That's excellent. Thank you for that. I am however in a situation where I want to add a banner to possible 50 or more category pages.
Would there be a easier way to do this rather than having to create multiple additional pages and then adding a code snippet to pull from each of those pages?
Hi JahMaican,
Oh sorry I thought you want a single banner for all categories. So here is the modified code (remove previous one):
It will display a field when you edit Product Category:
(view large image)