{"id":1361663,"date":"2010-01-27T20:34:01","date_gmt":"2010-01-27T20:34:01","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/headers-with-different-banners-for-different-pages-a-code-question\/"},"modified":"2016-08-19T15:42:47","modified_gmt":"2016-08-19T15:42:47","slug":"headers-with-different-banners-for-different-pages-a-code-question","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/headers-with-different-banners-for-different-pages-a-code-question\/","title":{"rendered":"Headers with different banners for different pages; a code question."},"content":{"rendered":"<p>I&#8217;ve been able to successfully use an alternate banner for specific pages on my site, using the following code:<\/p>\n<pre><code>if (is_page(&#039;5436&#039;)){\n\n\tinclude(TEMPLATEPATH.&#039;\/header-alternate.php&#039;); \n\n}\n\nelse {\n\n\tinclude(TEMPLATEPATH.&#039;\/headerdefault.php&#039;);<\/code><\/pre>\n<p>etc.<\/p>\n<p>However, when I try to use an elseif statement so that I can use a third banner for specific pages, it messes up the header (and hence the whole site).  The code I&#8217;m trying to use is (example):<\/p>\n<pre><code>if (is_page(&#039;5436&#039;)){\n\n\tinclude(TEMPLATEPATH.&#039;\/header-alternate.php&#039;); \n\n}\n\nelseif (is_page(&#039;5450&#039;,&#039;5508&#039;)){\n\n\tinclude(TEMPLATEPATH.&#039;\/header-alternate2.php&#039;); \n\n}\n\nelse {\n\n\tinclude(TEMPLATEPATH.&#039;\/headerdefault.php&#039;);<\/code><\/pre>\n<p>Am I doing something wrong?  All the necessary files are located in the right place.  Why does it work OK with the first example, but not the second?<\/p>\n","protected":false},"template":"","class_list":["post-1361663","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1361663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1361663\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1361663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}