<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>THE MOLITOR FORUMS &#187; Topic: different colors for nav buttons using CSS and PHP</title>
		<link>http://www.themolitor.com/forums/topic/different-colors-for-nav-buttons-using-css-and-php</link>
		<description>THE MOLITOR FORUMS &#187; Topic: different colors for nav buttons using CSS and PHP</description>
		<language>en-US</language>
		<pubDate>Tue, 28 Apr 2026 13:46:59 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.themolitor.com/forums/search.php</link>
		</textInput>
		<atom:link href="http://www.themolitor.com/forums/rss/topic/different-colors-for-nav-buttons-using-css-and-php" rel="self" type="application/rss+xml" />

		<item>
			<title>THE MOLITOR on "different colors for nav buttons using CSS and PHP"</title>
			<link>http://www.themolitor.com/forums/topic/different-colors-for-nav-buttons-using-css-and-php#post-22979</link>
			<pubDate>Thu, 05 Sep 2013 08:40:25 +0000</pubDate>
			<dc:creator>THE MOLITOR</dc:creator>
			<guid isPermaLink="false">22979@http://www.themolitor.com/forums/</guid>
			<description><p>Hi there,</p>
<p>One thing you could try is using the "class" field for menu items on the menus page in your dashboard. To make the "class" field visible, click the "screen options" button in the upper-right corner of the menus page and click the check box for classes. Then you can add unique class names to menu items and style them that way.</p>
<p>Since this goes beyond the level of support I'm able to provide, if that doesn't work or you need additional help with this customization, please submit a customization request here: <a href="http://themolitor.com/custom" rel="nofollow">http://themolitor.com/custom</a></p>
<p>Hope that helps!</p>
<p>Best,</p>
<p>Chris
</p></description>
		</item>
		<item>
			<title>mr_pro on "different colors for nav buttons using CSS and PHP"</title>
			<link>http://www.themolitor.com/forums/topic/different-colors-for-nav-buttons-using-css-and-php#post-22969</link>
			<pubDate>Thu, 05 Sep 2013 06:54:51 +0000</pubDate>
			<dc:creator>mr_pro</dc:creator>
			<guid isPermaLink="false">22969@http://www.themolitor.com/forums/</guid>
			<description><p>Below is the code from header.php which creates navigation menu dynamically. </p>
<p>I am trying to edit the code so that each menu button has a different colour.</p>
<p>I can see where 'has_nav_menu' comes in to create the necessary standards in the array ('menu_id' gets set to 'dropmenu'). How can I set it to different divs eg 'dropmenu-art' which are already set up in CSS. Alternatively I could just change background color in If loop below?</p>
<p>Please help!</p>
<pre><code>&#60;?php
	//NORMAL MENU
	if (has_nav_menu( &#039;main&#039; ) ) { wp_nav_menu(array(&#039;theme_location&#039; =&#62; &#039;main&#039;, &#039;container_id&#039; =&#62; &#039;navigation&#039;, &#039;menu_id&#039; =&#62; &#039;dropmenu&#039;)); }
	//SELECT MENU
	$menu_name = &#039;main&#039;;

    if ( ( $locations = get_nav_menu_locations() ) &#38;&#38; isset( $locations[ $menu_name ] ) ) {
		$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
		$menu_items = wp_get_nav_menu_items($menu-&#62;term_id);
		$menu_list = &#039;&#60;select id=&#34;selectMenu&#34;&#62;&#60;option value=&#34;&#34; selected=&#34;selected&#34;&#62;&#039;.__(&#039;Menu&#039;,&#039;themolitor&#039;).&#039;&#60;/option&#62;&#039;;

		foreach ( (array) $menu_items as $key =&#62; $menu_item ) {
	    	$title = $menu_item-&#62;title;
	   		$url = $menu_item-&#62;url;
	   		$menu_list .= &#039;&#60;option value=&#34;&#039; . $url . &#039;&#34;&#62;&#039; . $title . &#039;&#60;/option&#62;&#039;;

			/* -- set menu colours -- */
			if ($title == &#34;Art&#34;) {
					/* -------- How do I change &#34;menu_id&#039; from &#039;dropmenu&#039; to &#039;dropmenu-art&#039;  ????? ----------*/
				} else if ($title == &#34;Events&#34;) {
					/*   perhaps there is a method to just change CSS &#34;background: #000;&#34; property here instead?   */
				} else if ($title == &#34;Influences&#34;) {
					/*   etc   */
				} else if ($title == &#34;Links&#34;) {
					/**/
				} else if ($title == &#34;Personal&#34;) {
					/**/
				} else if ($title == &#34;Portraits&#34;) {
					/**/
				} else if ($title == &#34;Press&#34;) {
					/**/
				} else if ($title == &#34;Software&#34;) {
					/**/
				} else if ($title == &#34;Technical&#34;) {
					/**/
				} else if ($title == &#34;Video&#34;) {
					/**/
				} else {
					/**/
			}
		}
		$menu_list .= &#039;&#60;/select&#62;&#039;;
		echo $menu_list;
    }
    ?&#62;</code></pre></description>
		</item>

	</channel>
</rss>
