• I’m trying to come up with something that displays a different banner based on the post’s tags. For example, if a post has these tags: (shoes, pants, socks), and someone views the single post, I’d like a banner to pop up for shoes, pants or socks. I plan to make the banners and assign tags to them in the admin, but I need to find a way to match the post tags to the banner tags. Ideally, I’d like WP to do this:

    Look at a post’s tags, find a banner with matching tags, display matching banner. If no match is found, display random banner.

    I was looking at the get_the_tags template tag, but I can’t seem to figure out how to query the database to find banner matches. If anyone can help I would very much appreciate it.

  • The topic ‘Different banners for different post tags?’ is closed to new replies.