I am using a simple if/elseif/else bit of code to generate a header image for my page, I can't seem to understand why it isn't working properly. It determines the category of the page being displayed and displays a header accordingly. Here's the code in my header.php: 

&lt;?php if (is_category('dino run') || has_category('dino run')) { ?&gt;
    &lt;a href="dino-run/"&gt;&lt;li&gt;&lt;div class="logo splash2"&gt;Dino Run&lt;/div&gt;&lt;/li&gt;&lt;/a&gt;           
&lt;?php } elseif (is_category('potatoman') || has_category('potatoman')) { ?&gt;
    &lt;a href="http://www.pixeljam.com/potatoman/"&gt;&lt;div class="logo splash4"&gt;Potatoman Seeks the Troof&lt;/div&gt;&lt;/a&gt;
&lt;?php } elseif (is_category('glorkian' || 'glork') || has_category('glorkian' || 'glork')) { ?&gt;
    &lt;a href="glorkian"&gt;&lt;div class="logo splash3"&gt;Glorkian Warrior&lt;/div&gt;&lt;/a&gt;
&lt;?php } else { ?&gt;
        &lt;a href="#"&gt;&lt;div class="logo splash1"&gt;The Pixeljam Octology&lt;/div&gt;&lt;/a&gt;
&lt;?php } ?&gt;


The problem I'm having is I click on a post that has a category "Dino Run" and it displays fine... but when I click on a post that doesn't have any of the above 3 defined categories it doesn't fall through to the else statement, it actually displays the third header "Glorkian Warrior".

Any ideas what I did wrong here?


Question: How can I get a PieChart to be colored as I wish?
Answer: Update: I think you after something like

 pc3b = PieChart[percent, ChartLabels -&gt; labels, 
   PlotLabel -&gt; "Test-Grad-3b", ImageSize -&gt; 300,
   ChartStyle -&gt; {ColorData[{"TemperatureMap", {0, 8}}] /@ f}]




Similar trick with ColorFunction should work too...

rule = Thread[percent -&gt; f];
PieChart[percent, ChartLabels -&gt; labels, PlotLabel -&gt; "Test-Grad-4b", 
 ImageSize -&gt; 300,  ColorFunctionScaling -&gt; False,
 ColorFunction -&gt; (ColorData[{"TemperatureMap", {0, 8}}][#1 /. rule] &amp;)]






Original post:

percent = {12, 18, 24, 46};
labels = {1, 9, 15, 22};
f = {8, 7, 1, 4};
pc1 = PieChart[percent, ChartLabels -&gt; labels, PlotLabel -&gt; "Test-Grad-1", 
  ImageSize -&gt; 200, ColorFunction -&gt; "TemperatureMap"];
pc2 = PieChart[percent, ChartLabels -&gt; labels, PlotLabel -&gt; "Test-Grad-2",
  ImageSize -&gt; 200,  ColorFunction -&gt; 
        Function[{angle}, ColorData["TemperatureMap"][angle]]];
(*the following based on guessing how you might want to use color gradients with `f` *)
pc3 = PieChart[percent, ChartLabels -&gt; labels, PlotLabel -&gt; "Test-Grad-3", 
  ImageSize -&gt; 200, ChartStyle -&gt; {ColorData["TemperatureMap"][#] &amp; /@ Rescale[f]}];
pc4 = PieChart[percent, ChartLabels -&gt; labels, PlotLabel -&gt; "Test-Grad-4", 
  ImageSize -&gt; 200, ColorFunction -&gt; Function[{angle},
      ColorData["TemperatureMap"][Nearest[Rescale[f], angle]]]];
pc5 = PieChart[percent, ChartLabels -&gt; labels, PlotLabel -&gt; "Test-Comic", 
  ImageSize -&gt; 200,  ChartStyle -&gt; 9];
Row[{pc1, pc2, pc3, pc4, pc5}, Spacer[5]] // Panel