Different website logo depending on event category displayed
-
Hi
Hoping someone can help! I have a site that has 3 different page layouts. I’m trying to change the header.php logo file depending on the event category displayed. For example:
1) If an event page from category 1 is accessed, display logo-01.png in the website header
2) If an event page from category 2 is accessed, display logo-02.png in the website headerThe code I have so far is as follows:
<?php
global $post, $ai1ec_events_helper, $ai1ec_calendar_helper;
if (is_singular( ‘ai1ec_event’ ) && in_category(array(‘cat_ids’ => array(33)))) {
$logo_url = ‘https://www.mywebsite.co.uk/wp-content/uploads/2015/10/logo-01.png’;
} else if
if (is_singular( ‘ai1ec_event’ ) && in_category(array(‘cat_ids’ => array(34)))) {
$logo_url = ‘https://www.mywebsite.co.uk/wp-content/uploads/2015/10/logo-01.png’;
} ?>I’ve tried for hours to find a solution but am really struggling with this now!!!!
Many thanks in advance for any assistance!
- The topic ‘Different website logo depending on event category displayed’ is closed to new replies.