<?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>Wordpress and Webdesign Forum go41 &#187; Tag: catagory - Recent Posts</title>
		<link>http://forum.go41.de/tags/catagory</link>
		<description>How To, tips, php and css code for your WordPress site</description>
		<language>en-US</language>
		<pubDate>Thu, 09 Feb 2012 18:47:33 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://forum.go41.de/rss/tags/catagory" rel="self" type="application/rss+xml" />

		<item>
			<title>chantel on "custom rollover on catagory bar. Image instead of colour block."</title>
			<link>http://forum.go41.de/topic/custom-rollover-on-catagory-bar-image-instead-of-colour-block#post-231</link>
			<pubDate>Sat, 03 Apr 2010 09:20:16 +0000</pubDate>
			<dc:creator>chantel</dc:creator>
			<guid isPermaLink="false">231@http://forum.go41.de/</guid>
			<description><![CDATA[<p>Hi Joern,</p>
<p>I finally have some time to look at this!  I cant thank you enough for your time :)</p>
<p>Yes this is exactly what I want.  Ill start preparing the images, and see how I get on!</p>
<p>Do you think it will look good, or a little confusing to the eye?  Personally I think the images will help entice people click the catagories, someone else told me they think it will be messy and too busy...</p>
<p>Thank you!!</p>
<p>Happy Easter!</p>
<p>Chantel
</p>]]></description>
					</item>
		<item>
			<title>Joern on "custom rollover on catagory bar. Image instead of colour block."</title>
			<link>http://forum.go41.de/topic/custom-rollover-on-catagory-bar-image-instead-of-colour-block#post-197</link>
			<pubDate>Sun, 21 Mar 2010 16:59:14 +0000</pubDate>
			<dc:creator>Joern</dc:creator>
			<guid isPermaLink="false">197@http://forum.go41.de/</guid>
			<description><![CDATA[<p>I explain now how to display an image on roll over with the mouse in Arthemia's category bar.<br />
BACKUP index.php and style.css FIRST !!</p>
<p>I modified the category query in div id="middle" in some places, so you have to replace the full code from<br />
<pre><code>&#60;div id=&#34;middle&#34; class=&#34;clearfloat&#34;&#62;</code></pre>
<p>down to<br />
<pre><code>&#60;?php $i++; ?&#62;</code></pre>
<p>Code will follow later, going to tell you what it does:<br />
In $display_categories = array(... you have to put your categories as before, 5 or a multiple of 5, you have 25 categories listed.<br />
The line with $theCatSlug = get_term_by gets the slug of your categories to link each one with an image. These 25 images should be named with the slug of the category plus .jpg extension, ie: dietfitness.jpg for Diet &#38; Fitness category or mens.jpg for your Male Grooming category. You can find the slug in edit categories or in the link to your Archive of that category, like ...hk.com/category/mens/</p>
<p>now - that's your job to create 25 images in the size of 184pxx80px. These images have to be in a new folder (cats) behind themes folder in images/cats/  (content/themes/arthemia/images/cats)</p>
<p>No image for a category means that place becomes blank on hover as in demo link in previous post.</p>
<p>Back to index.php, I don not use<br />
div id="cat-&#60;?php echo $i; ..<br />
but<br />
div id="cat-&#60;?php if( $odd = $i%2 ) ..<br />
this will just show div id="cat-odd" or div id="cat-even" and makes your style.css easier, no list of all categories with different styling anymore.</p>
<p>The background (category) images are loaded straight but with a ;background-position: -200px, thus invisible. The entry in style.css .category:hover {background-position: 0 0 !important; makes them visible on hover.</p>
<p>I used Chantel's stylesheet and changed not much, she just has to replace all from<br />
#middle {<br />
down to<br />
#front-list {</p>
<p>now the replacement code for index.php (BACKUP FIRST)<br />
-<br />
<pre><code>&#60;div id=&#34;middle&#34; class=&#34;clearfloat&#34;&#62;

	&#60;img src=&#34;&#60;?php echo get_option(&#39;home&#39;); ?&#62;/wp-content/themes/arthemia/images/category.png&#34; class=&#34;clearfloat&#34; alt=&#34;&#34; /&#62;
	&#60;?php $display_categories = array(3,4,5,8,10,11,16,20,22,32); $i = 1;  //please put here your own category IDs !!!
	foreach ($display_categories as $dcategory) { ?&#62;

		&#60;?php $theCatSlug = get_term_by( &#39;ID&#39;, $dcategory, &#39;category&#39; );
			$theCatSlug = $theCatSlug-&#62;slug; ?&#62;

&#60;div id=&#34;cat-&#60;?php if( $odd = $i%2 ) { echo &#39;odd&#39;; } else { echo &#39;even&#39;; } ?&#62;&#34; class=&#34;category&#34; style=&#34;background-image: url(&#60;?php echo bloginfo(&#39;template_url&#39;); ?&#62;/images/cats/&#60;?php echo $theCatSlug; ?&#62;.jpg); background-repeat: no-repeat;background-position: -200px 0;z-index:0;cursor:pointer;&#34; onclick=&#34;window.location.href=&#39;&#60;?php echo get_category_link($dcategory);?&#62;&#39;&#34; title=&#34;Go to &#60;?php echo get_cat_name( $dcategory ); ?&#62;&#34; &#62;

		&#60;a class=&#34;overlay&#34; href=&#34;&#60;?php echo get_category_link($dcategory);?&#62;&#34;&#62;
			&#60;span class=&#34;cat_title&#34;&#62;&#60;?php echo get_cat_name( $dcategory ); ?&#62;&#60;/span&#62;
				&#60;?php echo category_description($dcategory); ?&#62;
				&#60;/a&#62;

&#60;/div&#62;
	&#60;?php $i++; ?&#62;</code></pre>
<p>-<br />
and the modified part to replace in style.css (BACKUP?!)<br />
-<br />
<pre><code>#middle {
	width: 920px;
	background:#fff;
	float:right;
	padding:10px;
	margin:10px 0;
	}

.category {
	width:164px;
	height:70px;  /* new */
	float:left;
	border-top:8px solid #333;
	margin:0px;
	padding:5px 10px 10px 10px;
	}
.category:hover {
	background-position: 0 0 !important;
	font-size:0.001em;
	}

.category p {
	margin:0;
	}

#cat-odd{border-top:8px solid #333333;}
#cat-even{border-top:8px solid #FF0033;}

/* not needed, replaced by #cat-odd and #cat-even just below !!
#cat-1, #cat-3, #cat-5, #cat-7, #cat-9, #cat-11, #cat-13, #cat-15, #cat-17, #cat-19, #cat-21, #cat-23, #cat-25{border-top:8px solid #333333;}
#cat-2, #cat-4, #cat-6, #cat-8, #cat-10, #cat-12, #cat-14, #cat-16, #cat-18, #cat-20, #cat-22, #cat-24{border-top:8px solid #FF0033;}
*/

#cat-odd{
	border-top:8px solid #333333;
	}
#cat-even{
	border-top:8px solid #FF0033;
	}

.category span.cat_title, #front-popular h3, #front-list .cat_title, #archive .cat_title {
	text-transform:lowercase;
	margin:0;
	font-weight:bold;
	font-size:1.5em District;
	letter-spacing:-0.05em;
	}

#front-popular h3 {
	color:#fff;
	}

.category a {
	color:#333;
	display:block;
	background:none;
	}

a.overlay:hover {
	filter:alpha(opacity=50);
	-moz-opacity:0.5;
	-khtml-opacity: 0.5;
	opacity: 0.5;
}
/* commented out, not needed because .category:hover makes background image visible
#cat-1:hover, #cat-3:hover, #cat-5:hover, #cat-7:hover, #cat-9:hover, #cat-11:hover, #cat-13:hover, #cat-15:hover, #cat-17:hover, #cat-19:hover, #cat-21:hover, #cat-23:hover {background:#333333; color:#fff; }
#cat-2:hover, #cat-4:hover, #cat-6:hover, #cat-8:hover, #cat-10:hover, #cat-12:hover, #cat-14:hover, #cat-16:hover, #cat-18:hover, #cat-20:hover, #cat-22:hover, #cat-24:hover {background:#FF0033; color:#fff; }
#cat-1:hover a, #cat-3:hover a, #cat-5:hover a,  #cat-7:hover a, #cat-9:hover a, #cat-11:hover a, #cat-13:hover a, #cat-15:hover a, #cat-17:hover a, #cat-19:hover a, #cat-21:hover a, #cat-23:hover a {background:#333333; color:#fff; }
#cat-2:hover a, #cat-4:hover a, #cat-6:hover a, #cat-8:hover a, #cat-10:hover a, #cat-12:hover a, #cat-14:hover a, #cat-16:hover a, #cat-18:hover a, #cat-20:hover a, #cat-22:hover a, #cat-24:hover a {background:#FF0033; color:#fff; }
*/
#bottom {
	width: 940px;
	}

#front-list {
	width:590px;
	background:#fff;
	padding:10px;
	font-size:1.5em District;
	line-height:1.75em;
	float:left;
	}</code></pre>
<p>-<br />
If something is not working, come back 'n ask, happy day..
</p>]]></description>
					</item>
		<item>
			<title>Joern on "custom rollover on catagory bar. Image instead of colour block."</title>
			<link>http://forum.go41.de/topic/custom-rollover-on-catagory-bar-image-instead-of-colour-block#post-196</link>
			<pubDate>Sun, 21 Mar 2010 11:49:34 +0000</pubDate>
			<dc:creator>Joern</dc:creator>
			<guid isPermaLink="false">196@http://forum.go41.de/</guid>
			<description><![CDATA[<p>chantel, try this: first go to:</p>
<p><a href="http://themes.go41.de/extend/?wptheme=arthemia" rel="nofollow">http://themes.go41.de/extend/?wptheme=arthemia</a></p>
<p>should show you arthemia theme, now click:</p>
<p><a href="http://themes.go41.de/extend/articles/" rel="nofollow">http://themes.go41.de/extend/articles/</a></p>
<p>this category bar, is it about what you think?
</p>]]></description>
					</item>
		<item>
			<title>Joern on "custom rollover on catagory bar. Image instead of colour block."</title>
			<link>http://forum.go41.de/topic/custom-rollover-on-catagory-bar-image-instead-of-colour-block#post-195</link>
			<pubDate>Sat, 20 Mar 2010 00:31:02 +0000</pubDate>
			<dc:creator>Joern</dc:creator>
			<guid isPermaLink="false">195@http://forum.go41.de/</guid>
			<description><![CDATA[<p>I need some time to test, might give you a complete solution with images you have to name according to your category slug, ie. day-spa.jpg, salons.jpg, antiaging.jpg, shop.jpg or pregnancy.jpg<br />
Or .gif, up to you. But gimme time, here the clocks tick differently..
</p>]]></description>
					</item>
		<item>
			<title>chantel on "custom rollover on catagory bar. Image instead of colour block."</title>
			<link>http://forum.go41.de/topic/custom-rollover-on-catagory-bar-image-instead-of-colour-block#post-194</link>
			<pubDate>Fri, 19 Mar 2010 19:27:54 +0000</pubDate>
			<dc:creator>chantel</dc:creator>
			<guid isPermaLink="false">194@http://forum.go41.de/</guid>
			<description><![CDATA[<p>Hello joern,</p>
<p>Please look at <a href="http://www.beautybuzzhk.com" rel="nofollow">http://www.beautybuzzhk.com</a>.</p>
<p>I have extended my catagory bar to hold now 25 catagories. I wish to have an image when the mouse rolls over instead of the colour block. The image will be different for every catagory and also they have to be the same size.</p>
<p>I saw your example of <a href="http://themes.go41.de/?wptheme=Barthami_Corporate" rel="nofollow">http://themes.go41.de/?wptheme=Barthami_Corporate</a>.  this is similar to what i want except:</p>
<p>i want the natural state ie with no roll over, to be with a white background, text and no image. (as it is currently)</p>
<p>i want the rollover state to have no words and have a photo. So i want the text to dissapear and be replaced by an image.</p>
<p>i want all the photos to be the same size.</p>
<p>Thank you again for all your help.</p>
<p>Chantel
</p>]]></description>
					</item>

	</channel>
</rss>

