<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Digital Mobile</title>
	<atom:link href="http://digitalraindrops.net/wp-test/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://digitalraindrops.net/wp-test</link>
	<description>Under Construction - Please Test in your Mobile</description>
	<lastBuildDate>Sat, 30 Jul 2011 16:54:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Twenty Eleven Dark Child Theme</title>
		<link>http://digitalraindrops.net/wp-test/index.php/2011/07/twenty-eleven-dark-child-theme/</link>
		<comments>http://digitalraindrops.net/wp-test/index.php/2011/07/twenty-eleven-dark-child-theme/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 07:18:18 +0000</pubDate>
		<dc:creator>Digital Raindrops</dc:creator>
				<category><![CDATA[Twenty Eleven]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[dark theme]]></category>
		<category><![CDATA[dark theme child theme]]></category>
		<category><![CDATA[wordpress 3.2 child theme]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/2011/07/twenty-eleven-dark-child-theme/</guid>
		<description><![CDATA[The recent release of WordPress 3.2 and the updated Twenty Eleven theme means that we need a slightly different approach to the child theme styles if we want to use the dark theme. The new theme options for the dark &#8230; <a href="http://digitalraindrops.net/wp-test/index.php/2011/07/twenty-eleven-dark-child-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The recent release of <a href="http://wordpress.org">WordPress 3.2</a> and the updated Twenty Eleven theme means that we need a slightly different approach to the child theme styles if we want to use the dark theme.</p>
<p>The new theme options for the dark theme are loaded after the child theme has loaded it’s stylesheet so some color changes will not work, to overcome this we will load a second stylesheet after the parent twenty eleven theme stylesheet and dark stylesheet have loaded.</p>
<p><span id="more-3491"></span></p>
<h2>The Child Theme</h2>
<p>Lets use the <a href="http://codex.wordpress.org/Child_Themes">WordPress Codex</a> example stylesheet and change this for twenty eleven, we copy the screenshot.png image file across to the child themes folder as well, this is the sample <strong>style.css</strong> updated for the twenty eleven theme.</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<pre class="brush: css; title: Code by Digital Raindrops; notranslate">
/*
Theme Name: Twenty Eleven Child
Description: Child theme for the Twenty Eleven theme
Author: Digital raindrops
Template: twentyeleven
*/

@import url(&quot;../twentyeleven/style.css&quot;);

#site-title a {
 color: #009900;
}
</pre>
<p>If we activate or child theme we can see that the style for the title color has changed to green, this is the same result we had in the twenty ten theme.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/elevenchild1.png"><img style="display: inline; border: 0px;" title="eleven-child-1" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/elevenchild1_thumb1.png" alt="eleven-child-1" width="654" height="495" border="0" /></a></p>
<h2>The Dark Theme</h2>
<p>A really nice feature of the twenty eleven theme is the dark theme option, if we navigate to Admin &gt; Appearance &gt; Themes &gt; Theme Options, we can activate the dark theme by selection of the dark theme option.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/elevenchild2.png"><img style="display: inline; border: 0px;" title="eleven-child-2" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/elevenchild2_thumb.png" alt="eleven-child-2" width="654" height="437" border="0" /></a></p>
<p>If we now preview the theme we can see the dark theme, however the title has lost our changes, this means that we will not be able to change the color styles from style.css the same way we did for the twenty ten theme.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/elevenchild3.png"><img style="display: inline; border: 0px;" title="eleven-child-3" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/elevenchild3_thumb.png" alt="eleven-child-3" width="654" height="504" border="0" /></a></p>
<p>Looking at the page source we can see that the sequence the stylesheets are loaded into the head section is the reason for our title change being lost, with CSS meaning cascading style sheets, the last change is the one that is applied.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/elevenchild4.png"><img style="display: inline; border: 0px;" title="eleven-child-4" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/elevenchild4_thumb.png" alt="eleven-child-4" width="654" height="232" border="0" /></a></p>
<h2>The Changes</h2>
<p>What we will do is add a second stylesheet and do all our changes in there, so we create a file in our child theme called <strong>custom-style.css</strong> and we add our title style into this new file</p>
<pre class="brush: css; title: Code by Digital Raindrops; notranslate">
site-title a {
 color: #009900;
}
</pre>
<p>We need a way to load this stylesheet, so we create a file called <strong>functions.php, </strong>there is an action hook<strong> &#8216;after_setup_theme&#8217;</strong> we can call this after the child and parent themes have loaded, we create a function to run as an argument, notice the last <strong>add_action()</strong> we have passed in <strong>11</strong> as the last argument, this means that our stylesheet will be loaded later that the other theme stylesheets.</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
&lt;?php

/** Tell WordPress to run post_theme_setup() when the 'after_setup_theme' hook is run. */
add_action( 'after_setup_theme', 'post_theme_setup' );

if ( !function_exists( 'post_theme_setup' ) ):
function post_theme_setup() {

/* Add our new styles after all stylesheets have loaded */
function twentyeleven_enqueue_child_style() {
wp_enqueue_style( 'child_style', get_stylesheet_directory_uri() . '/custom-style.css', array(), null );
do_action( 'twentyeleven_enqueue_child_style', 'child_style' );
}
add_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_child_style', 11 );
}
endif;
</pre>
<h2>Conclusion</h2>
<p>We can now change the dark theme styles in the custom-style.css without having to change any files in the twenty eleven parent theme, as we can now see our style is loaded.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/elevenchild5.png"><img style="display: inline; border: 0px;" title="eleven-child-5" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/elevenchild5_thumb.png" alt="eleven-child-5" width="654" height="159" border="0" /></a></p>
<p>Registered members can download the child theme used for this example, we hope this quick tutorial will help other WordPress users.</p>
<p>[private]</p>
<p>[download id="74"]</p>
<p>[/private]</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<div class="adtext-left"><h2>Notices</h2>
<p>
We do require your feedback to improve our themes and tutorials, please 

leave your comments good or bad.
</p>
<p>
<strong>Code disclaimer information</strong>
</p>
<p>
If 

this document contains programming examples, www.DigitalRaindrops.net grants you a 

nonexclusive copyright license to use all programming code from which you can generate 

similar functions tailored to your own specific needs.
</p>
<p>
<strong>All sample code is 

provided by http://DigitalRaindrops.net for learning illustrative purposes only.</strong>
</p>
<p>
These examples have not been thoroughly tested under all conditions. 

www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, 

or function of these examples. 
</p>
<p>
All programs contained herein are provided to you “AS 

IS” without any warranties of any kind. The implied warranties of non-infringement, 

merchantability and fitness for a particular purpose are expressly disclaimed.
</p>
<h2>Membership</h2>
<p>
Registration is now open: <a 

href="http://digitalraindrops.net/register/">New Member Registration</a>
</p>
<p>
Membership is 

now open: <a href="http://digitalraindrops.net/login/">Existing Member Login</a>
</p>
<p>
Visit 

the: <a href="href="http://digitalraindrops.net/members/">Forum and Feedback</a>
</p>
<p>
This 

website is a tool to support and promote WordPress and Artisteer theme development, please 

support, share and give credit for any benefits you gain from the tutorials on this website.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/wp-test/index.php/2011/07/twenty-eleven-dark-child-theme/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress 2011 Color Fun</title>
		<link>http://digitalraindrops.net/wp-test/index.php/2011/07/wordpress-2011-color-fun/</link>
		<comments>http://digitalraindrops.net/wp-test/index.php/2011/07/wordpress-2011-color-fun/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 06:53:37 +0000</pubDate>
		<dc:creator>Second Author</dc:creator>
				<category><![CDATA[Twenty Eleven]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[admin theme colors]]></category>
		<category><![CDATA[admin theme options]]></category>
		<category><![CDATA[Child Themes]]></category>
		<category><![CDATA[color picker]]></category>
		<category><![CDATA[colors]]></category>
		<category><![CDATA[theme colors]]></category>
		<category><![CDATA[WordPress 3.2]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/?p=3443</guid>
		<description><![CDATA[We have been playing with the new twenty eleven theme from the WordPress version 3.2 release, navigating around the admin screen we found some of the nice new twenty eleven theme options. There is an option to select a dark &#8230; <a href="http://digitalraindrops.net/wp-test/index.php/2011/07/wordpress-2011-color-fun/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We have been playing with the new twenty eleven theme from the <a href="http://wordpress.org/" target="_blank">WordPress</a> version 3.2 release, navigating around the admin screen we found some of the nice new twenty eleven theme options.</p>
<p>There is an option to select a dark theme stylesheet as well as the standard, another option is to change all the link options site wide, this option injects styles into the head section as the theme loads, however we did not like the website title being a link, and we got thinking how it would be great to have a lot more control over the colors, so we created a nice little child theme and took control.</p>
<p><span id="more-3490"></span></p>
<p>We have already been looking at extracting the colors from the header and we have merged this into our child theme, it makes it easy to color the theme around the image colors, we have extracted the most popular 20 colors and created variants of darker, lighter and complimentary, splitting the neutrals into their own section that is the black to white colors.</p>
<h2>The Download</h2>
<p>This child theme will be our first members only download, all downloads will become members only over the next few months, there is no fee for membership and your details will not be shared.</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<p>If you are not registered you can <a href="http://digitalraindrops.net/register/" target="_blank">register now</a>, or prefer not to register we respect your position, and will email a copy of the theme if you send an <a href="mailto:members@digitalraindrops.net" target="_blank">email request</a> , login and revisit this page for the Download.</p>
<p>[private]</p>
<p>[download id="73"]</p>
<p>[/private]</p>
<h2>The Child Theme</h2>
<p>To load and run the child theme you must be running <strong>at least version WordPress 3.2 </strong>if you do not see the twenty eleven theme in the theme options then you <strong>can not</strong> use this child theme.</p>
<p>The first part is just to download the theme install it and activate it, it is best to do this first in a local WordPress environment, the <a href="http://digitalraindrops.net/2010/08/getting-started/" target="_blank">first section of this post</a> has a bit about setting up a local WordPress.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/07/Colors.png"><img style="display: inline; border: 0px;" title="Colors" src="http://digitalraindrops.net/wp-content/uploads/2011/07/Colors_thumb.png" alt="Colors" width="654" height="340" border="0" /></a></p>
<h2>Header Image</h2>
<p>Twenty Eleven by default will show random headers, if we want to match our theme colors to our header we set a static header, or upload our own, we have uploaded our own for our example.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/07/Colors2.png"><img style="display: inline; border: 0px;" title="Colors-2" src="http://digitalraindrops.net/wp-content/uploads/2011/07/Colors2_thumb.png" alt="Colors-2" width="654" height="461" border="0" /></a></p>
<h2>The Dark Side</h2>
<p>Twenty ten has the option to load a dark stylesheet, our image would look better in a dark theme so we activate the dark theme from the twenty eleven theme options.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/07/Colors3.png"><img style="display: inline; border: 0px;" title="Colors-3" src="http://digitalraindrops.net/wp-content/uploads/2011/07/Colors3_thumb.png" alt="Colors-3" width="654" height="455" border="0" /></a></p>
<h2>Theme Colors</h2>
<p>That is all standard so what can our child theme do with the colors, if you have seven minutes then you can get a quick overview from YouTube?</p>
<div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:8ae88b40-8722-4af8-9743-9668f5fcfbcf" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<div><object width="425" height="355" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/A2OUKabYF6k&amp;hl=en" /><embed width="425" height="355" type="application/x-shockwave-flash" src="http://www.youtube.com/v/A2OUKabYF6k&amp;hl=en" /></object></div>
</div>
<h2></h2>
<h2>Updated Admin Screen</h2>
<p>We have updated the admin area, please view this video for the changes, and it will also show the color picker first instance.</p>
<div id="scid:6737277B-5D6D-4f48-ABFC-DD9C333F4C5D:8ae88b40-8722-4af8-9743-9668f5fcfbcf" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<div><object width="425" height="355" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/L2Y7KJ_hiSw&amp;hl=en" /><embed width="425" height="355" type="application/x-shockwave-flash" src="http://www.youtube.com/v/L2Y7KJ_hiSw&amp;hl=en" /></object></div>
</div>
<h2></h2>
<h2>Theme Colors Page</h2>
<p>When we select the theme colors page we will see a set of colors from the twenty eleven themes stylesheet, these are the main text colors, links, menus and borders.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors11.png"><img style="display: inline; border: 0px;" title="Colors-11" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors11_thumb.png" alt="Colors-11" width="654" height="457" border="0" /></a></p>
<h2>Color Selector</h2>
<p>Twenty Eleven has a nice color selector, it took us a lot of headaches to get this to work with all our colors, but we managed it <span style="color: #ff8000;">“Gold Star * “ </span><span style="color: #000000;">, if we select the color swatch or press the select a color button the color wheel will appear so we can select or tweak the color, and to reset the color to the themes default we do the same for the “Reset to Default” options.</span></p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors12.png"><img style="display: inline; border: 0px;" title="Colors-12" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors12_thumb.png" alt="Colors-12" width="654" height="414" border="0" /></a></p>
<h2>Header Color Swatches</h2>
<p>At the bottom of our page we can see the colors generated by our header image, as we have already said the first twenty colors, plus the greys, these are so we can find the colors we want, copy the hex codes (#ff00ff) to notepad so we can use them in our theme, we are only showing four from the twenty in this image.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors13.png"><img style="display: inline; border: 0px;" title="Colors-13" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors13_thumb.png" alt="Colors-13" width="654" height="523" border="0" /></a></p>
<h2>Global Links</h2>
<p>A new feature of twenty eleven is the global link color, we can select a color and set this from the theme options tab, we have used one of the colors from our image.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors6.png"><img style="display: inline; border: 0px;" title="Colors-6" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors6_thumb.png" alt="Colors-6" width="654" height="455" border="0" /></a></p>
<h2>Header Colors</h2>
<p>Here we can change the text and border colors for our theme, by default the title has the link color as a hover over, we may want to set this to the same as our main color, and we can change the header tag line which is the Site Description.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors14.png"><img style="display: inline; border: 0px;" title="Colors-14" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors14_thumb.png" alt="Colors-14" width="654" height="269" border="0" /></a></p>
<h2>Menu Colors</h2>
<p>The menu has a built in background gradient and a solid color for older browsers, here we have changed the menu gradient start, and we would change the Menu Background for the older browsers.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors15.png"><img style="display: inline; border: 0px;" title="Colors-15" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors15_thumb.png" alt="Colors-15" width="654" height="274" border="0" /></a></p>
<h2>Sub Menu and Hover Colors</h2>
<p>Here we could change the other color attributes for the dropdown and hover colors.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors16.png"><img style="display: inline; border: 0px;" title="Colors-16" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors16_thumb.png" alt="Colors-16" width="654" height="418" border="0" /></a></p>
<h2>Title Colors</h2>
<p>Now we can change the title colors and hover colors for our theme</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors17.png"><img style="display: inline; border: 0px;" title="Colors-17" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors17_thumb.png" alt="Colors-17" width="644" height="393" border="0" /></a></p>
<h2>Stylesheet</h2>
<p>There are two stylesheet boxes, the first is so we can add any other changes without having to edit files, the second is the styles that are generated by the theme, these are for any developers that could be copy and use these to create a new child theme.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors18.png"><img style="display: inline; border: 0px;" title="Colors-18" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors18_thumb.png" alt="Colors-18" width="654" height="465" border="0" /></a></p>
<h2>Main Background</h2>
<p>The main background can be changed with the standard WordPress twenty eleven background options.</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors10.png"><img style="display: inline; border: 0px;" title="Colors-10" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors10_thumb.png" alt="Colors-10" width="654" height="352" border="0" /></a></p>
<h2>The Results</h2>
<p>Here we can see that our header now fits into our theme, and the theme colors compliment our header graphic!</p>
<p><a href="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors1.png"><img style="display: inline; border: 0px;" title="Colors-1" src="http://digitalraindrops.net/wp-test/wp-content/uploads/2011/07/Colors1_thumb.png" alt="Colors-1" width="654" height="471" border="0" /></a></p>
<p>We hope that you like our child theme, WordPress are bringing out a new theme each year, that should keep us busy?</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<div class="adtext-left"><h2>Notices</h2>
<p>
We do require your feedback to improve our themes and tutorials, please 

leave your comments good or bad.
</p>
<p>
<strong>Code disclaimer information</strong>
</p>
<p>
If 

this document contains programming examples, www.DigitalRaindrops.net grants you a 

nonexclusive copyright license to use all programming code from which you can generate 

similar functions tailored to your own specific needs.
</p>
<p>
<strong>All sample code is 

provided by http://DigitalRaindrops.net for learning illustrative purposes only.</strong>
</p>
<p>
These examples have not been thoroughly tested under all conditions. 

www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, 

or function of these examples. 
</p>
<p>
All programs contained herein are provided to you “AS 

IS” without any warranties of any kind. The implied warranties of non-infringement, 

merchantability and fitness for a particular purpose are expressly disclaimed.
</p>
<h2>Membership</h2>
<p>
Registration is now open: <a 

href="http://digitalraindrops.net/register/">New Member Registration</a>
</p>
<p>
Membership is 

now open: <a href="http://digitalraindrops.net/login/">Existing Member Login</a>
</p>
<p>
Visit 

the: <a href="href="http://digitalraindrops.net/members/">Forum and Feedback</a>
</p>
<p>
This 

website is a tool to support and promote WordPress and Artisteer theme development, please 

support, share and give credit for any benefits you gain from the tutorials on this website.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/wp-test/index.php/2011/07/wordpress-2011-color-fun/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Getting Image Colors</title>
		<link>http://digitalraindrops.net/wp-test/index.php/2011/06/getting-image-colors/</link>
		<comments>http://digitalraindrops.net/wp-test/index.php/2011/06/getting-image-colors/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 13:19:14 +0000</pubDate>
		<dc:creator>Digital Raindrops</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[Get Image Colors]]></category>
		<category><![CDATA[Get Image Colors php]]></category>
		<category><![CDATA[most used image colors]]></category>
		<category><![CDATA[Twenty Eleven]]></category>
		<category><![CDATA[WordPress 3.2]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/?p=3409</guid>
		<description><![CDATA[We were looking around for functions to get the most used colors from an image, we will be using this when we follow up our child theme creators for the twenty eleven theme, which will be released shortly. We spent &#8230; <a href="http://digitalraindrops.net/wp-test/index.php/2011/06/getting-image-colors/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We were looking around for functions to get the most used colors from an image, we will be using this when we follow up our child theme creators for the twenty eleven theme, which will be released shortly.</p>
<p>We spent quite a while looking around the internet for some php code to find the most common colors from an image, there was code for two different libraries the Imagick and GD2, as we test with <a href="http://www.apachefriends.org/en/xampp-windows.html">XAMPP</a> we soon found that by default <a href="http://www.imagemagick.org/script/index.php" target="_blank">Imagick</a> was not installed.</p>
<p><span id="more-3409"></span></p>
<p>After a few hours we managed to find a post with <a href="http://jerodmoore.com/?p=11" target="_blank">decent instructions</a> for activating Imagick on XAMPP.</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<p>We found some code and this worked quite well after some adjustments, however using this local was fine but this server and many others do not have Imagick installed.</p>
<p>Off we went looking for some php code so we can use the GD2 library, we found a php class file from 2002 by Andy Chase, it is hard to believe the only samples we could find were some nine years old.</p>
<p>In testing we found that a clone function was causing a problem so we adjusted the code and have it working, the lists of top twenty most used colors was sometimes heavy with the neutrals, so we split these, we wanted something in GD2 similar to <a href="http://www.propiedadprivada.com/css-color-generator-from-pics/278/" target="_blank">this website</a> which used the Imagick library.</p>
<p>With the help of the class written by Andy Chase we were able to get close, with the addition of an extra column for the seperated Neutrals.</p>
<p>We think the code needs a revival as it could help developers choose the colors for the website, we know there are web pages that do this, but it will be nice to have this as a plugin or theme feature.</p>
<p>We are still testing the <a href="http://wordpress.org/news/2011/06/wordpress-3-2-release-candidate/" target="_blank">WordPress 3.2 RC</a> and the twenty eleven theme, we have created a website in a new folder so you can have a look at the <a href="http://digitalraindrops.net/wp-test/?page_id=4" target="_blank">twenty eleven theme</a>, which has a dark and light option.</p>
<p>The new features are great, it has a full size editor, more post types, a featured posts page template, and a few more nice things, you can choose a dark theme, and the layout left., right or no sidebar.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/06/Capture2.png"><img class="alignnone size-full wp-image-3411" title="Capture2" src="http://digitalraindrops.net/wp-content/uploads/2011/06/Capture2.png" alt="" width="654" height="553" /></a></p>
<p>We will release the colors code when WordPress 3.2 is in full release as they are still working on the theme and things may change.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/06/Capture.png"><img style="display: inline; border: 0px;" title="Capture" src="http://digitalraindrops.net/wp-content/uploads/2011/06/Capture_thumb.png" alt="Capture" width="654" height="459" border="0" /></a></p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<div class="adtext-left"><h2>Notices</h2>
<p>
We do require your feedback to improve our themes and tutorials, please 

leave your comments good or bad.
</p>
<p>
<strong>Code disclaimer information</strong>
</p>
<p>
If 

this document contains programming examples, www.DigitalRaindrops.net grants you a 

nonexclusive copyright license to use all programming code from which you can generate 

similar functions tailored to your own specific needs.
</p>
<p>
<strong>All sample code is 

provided by http://DigitalRaindrops.net for learning illustrative purposes only.</strong>
</p>
<p>
These examples have not been thoroughly tested under all conditions. 

www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, 

or function of these examples. 
</p>
<p>
All programs contained herein are provided to you “AS 

IS” without any warranties of any kind. The implied warranties of non-infringement, 

merchantability and fitness for a particular purpose are expressly disclaimed.
</p>
<h2>Membership</h2>
<p>
Registration is now open: <a 

href="http://digitalraindrops.net/register/">New Member Registration</a>
</p>
<p>
Membership is 

now open: <a href="http://digitalraindrops.net/login/">Existing Member Login</a>
</p>
<p>
Visit 

the: <a href="href="http://digitalraindrops.net/members/">Forum and Feedback</a>
</p>
<p>
This 

website is a tool to support and promote WordPress and Artisteer theme development, please 

support, share and give credit for any benefits you gain from the tutorials on this website.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/wp-test/index.php/2011/06/getting-image-colors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change Category Sort Order</title>
		<link>http://digitalraindrops.net/wp-test/index.php/2011/06/change-category-sort-order/</link>
		<comments>http://digitalraindrops.net/wp-test/index.php/2011/06/change-category-sort-order/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 13:33:38 +0000</pubDate>
		<dc:creator>Second Author</dc:creator>
				<category><![CDATA[Twenty Ten]]></category>
		<category><![CDATA[Ascending]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[Category Page reverse Order]]></category>
		<category><![CDATA[category post list]]></category>
		<category><![CDATA[Reverse Sort]]></category>
		<category><![CDATA[Sort Order]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/?p=3396</guid>
		<description><![CDATA[It is strange that there is no option to reverse the display order of the posts on the category page, when we select a category the list is the same as a blog, in descending order newest to oldest. That &#8230; <a href="http://digitalraindrops.net/wp-test/index.php/2011/06/change-category-sort-order/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It is strange that there is no option to reverse the display order of the posts on the category page, when we select a category the list is the same as a blog, in descending order newest to oldest.</p>
<p>That is great for a news or magazine website, but what if we wanted to display a series of our posts in ascending order, for a tutorail with the oldest part one first?</p>
<p><span id="more-3396"></span></p>
<p>The easy &#8216;no code way&#8217; if we do not have many to deal with, is just to alter the dates and times on the posts to reverse the order.</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<p>A simples code way is just to add a call <strong>before the loop</strong> in the <strong>category.php</strong> file, this will work on <strong>all categories</strong> though, we could alse code to find the category and add a string of &#8216;if  elseif&#8217; statements.</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">&lt;?php query_posts($query_string . &quot;&amp;order=ASC&quot;); ?&gt;</pre>
<h2>Our Option</h2>
<p>We want to empower the website administrators to be able to select which categories they want to sort in a ascending order, we also want to do this on the category edit page by a simple dropdown selector.</p>
<p>If we look at what we have now there is no way to change the sort order on the &#8216;Add New Category&#8217; page, so we will add the option to the edit Category page.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/06/asc1.png"><img style="display: inline; border: 0px;" title="asc-1" src="http://digitalraindrops.net/wp-content/uploads/2011/06/asc1_thumb.png" border="0" alt="asc-1" width="644" height="349" /></a></p>
<p>If we look at the posts in the aciform category we can see the latest post was Lorum Ipsum, this could be lesson 4 in a series of tutorials, we want to reverse this sort order.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/06/asc2.png"><img style="display: inline; border: 0px;" title="asc-2" src="http://digitalraindrops.net/wp-content/uploads/2011/06/asc2_thumb.png" border="0" alt="asc-2" width="654" height="498" /></a></p>
<p>We have as always created a twenty ten child theme, but this can be added in minutes to an artisteer or many other themes, all we need to do is add a folder and two bits of code.</p>
<p>Download the twenty ten child theme here: [download id="72"]</p>
<p>Activate the child theme on a local install, navigate to Admin &gt; Posts &gt; Categories</p>
<p>From the list choose any category and edit, see the new option &#8216;Sort Order&#8217;, we used code from a <a href="http://en.bainternet.info/2011/wordpress-category-extra-fields" target="_blank">this post</a> we found online and changed the code for this post.</p>
<p>We prefer to work with a single array option, as this is more inline with how WordPress ask us to develop now, rather than one option per category, so we have reworked the code.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/06/asc3.png"><img style="display: inline; border: 0px;" title="asc-3" src="http://digitalraindrops.net/wp-content/uploads/2011/06/asc3_thumb.png" border="0" alt="asc-3" width="654" height="395" /></a> If we change the sort order to ascending we can now see the order has been reversed, pretty effective.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/06/asc41.png"><img style="display: inline; border: 0px;" title="asc-4" src="http://digitalraindrops.net/wp-content/uploads/2011/06/asc4_thumb.png" border="0" alt="asc-4" width="654" height="551" /></a></p>
<h2>Adding the functions to a Theme</h2>
<p>In the download there is a folder called <strong>/includes/</strong> and inside the folder is a file called <strong>category-functions.php</strong> drop the sub folder into the theme&#8217;s folder, as in the download.</p>
<p>Two bits of code to add first open <strong>functions.php</strong> and add in this code block, the first line is a bit of shorthand code, this checks to see it it is a child or parent theme and returns the file name and path.</p>
<p>The second line just looks to see if the file exists, if it is then include it, the last line just returns the stored options into a global variable if they exists.</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">

$filename=( is_child_theme() ) ? STYLESHEETPATH .'/includes/category-functions.php' : TEMPLATEPATH .'/includes/category-functions.php';
if( file_exists($filename) ) include_once( $filename );

$cat_meta = get_option(&quot;theme_cat_meta&quot;);
</pre>
<h2>Category Page</h2>
<p>Next in the themes folder we should have a file <strong>category.php</strong> open this file and find the <strong>get_template_part( &#8216;loop&#8217;,'category&#8217; )</strong> just before this line we want to add another block of code.</p>
<p>This bit of code looks to see if the category meta is set and if it is &#8216;ASC&#8217;, if it is it just reverses the sort order.</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">

&lt;?php
 /* Start Reverse Posts */
 global $cat, $cat_meta;
 if (isset( $cat_meta[$cat]['order'] ) &amp;&amp;  $cat_meta[$cat]['order'] == 'ASC' ) query_posts($query_string . &quot;&amp;order=ASC&quot;)
 /* End Reverse Posts */
 ?&gt;
</pre>
<h2>Other Themes</h2>
<p>If you have Artisteer or you do not have the template part, or you can not find <strong>category.php</strong> just save <strong>index.php</strong> as <strong>category.php</strong>, open the new file.</p>
<p>Add the code before the <strong>if( have_posts() )</strong></p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
&lt;?php
 /* Start Reverse Posts */
 global $cat, $cat_meta;
 if (isset( $cat_meta[$cat]['order'] ) &amp;&amp;  $cat_meta[$cat]['order'] == 'ASC' ) query_posts($query_string . &quot;&amp;order=ASC&quot;)
 /* End Reverse Posts */
 ?&gt;

&lt;?php
 if(have_posts()) {
</pre>
<p><strong>Warning:</strong> careful with the php tags, if you are <strong>already inside</strong> an unclosed &lt;?php tag then you <strong>do not</strong> need the tags from the new code above.</p>
<h2>Conclusion</h2>
<p>Inside the file <strong>category-functions.php</strong> there are two functions, one to add the meta box to the Edit Category page, the other to set the <strong>$cat_meta</strong> array and store in in a WordPress option, we are not looking at that code as it is covered in the link above.</p>
<p>We now can set the sort order for any category on our website, why it is not already built in, who knows?</p>
<h2>category-functions.php</h2>
<p>For reference here is the contents of the file:</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
&lt;?php

add_action ( 'edit_category_form_fields', 'extra_category_fields' );
function extra_category_fields( $tag ) {
 global $theme_css, $cat_meta;
 $t_id = $tag-&gt;term_id;
 $curr_meta = $cat_meta[$t_id];
 $direction=( $curr_meta &amp;&amp; isset( $curr_meta['order'] ) &amp;&amp; $curr_meta['order'] ) ? $curr_meta['order'] : &quot;DESC&quot;;
?&gt;

&lt;?php
$sort_order = array(
 'DESC' =&gt; array(
 'value' =&gt; 'DESC',
 'label' =&gt; 'Descending'
 ),
 'ASC' =&gt; array(
 'value' =&gt; 'ASC',
 'label' =&gt; 'Ascending'
 ),
);
?&gt;

&lt;tr&gt;
 &lt;th scope=&quot;row&quot; valign=&quot;top&quot;&gt;&lt;label for=&quot;cat_meta[order]&quot;&gt;&lt;?php _e('Sort Order'); ?&gt;&lt;/label&gt;&lt;/th&gt;
 &lt;td&gt;
 &lt;select id=&quot;cat_meta[order]&quot; name=&quot;cat_meta[order]&quot;&gt;
   &lt;?php
   foreach ( $sort_order as $option ) :
     $label = $option['label'];
     $selected = '';
     if ( $direction &amp;&amp; $direction ==  $option['value'] ) $selected = 'selected=&quot;selected&quot;';
     echo '&lt;option style=&quot;padding-right: 10px;&quot; value=&quot;' . esc_attr( $option['value'] ) . '&quot; ' . $selected . '&gt;' . $label . '&lt;/option&gt;';
   endforeach;
   ?&gt;
 &lt;/select&gt;
 &lt;/td&gt;
 &lt;/tr&gt;
&lt;?php
}

add_action ( 'edited_category', 'save_extra_category_fields');
function save_extra_category_fields( $term_id ) {
 global $cat_meta;
 if ( isset( $_POST['cat_meta'] ) ) {
   $t_id = $term_id;
   $cat_keys = array_keys($_POST['cat_meta']);
   $curr_meta = array();
   foreach ($cat_keys as $key){
     if (isset($_POST['cat_meta'][$key])){
       $curr_meta[$key] = $_POST['cat_meta'][$key];
     }
   }
   $cat_meta[$t_id] = $curr_meta;
   update_option( &quot;theme_cat_meta&quot;, $cat_meta );
 }
}
?&gt;
</pre>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<div class="adtext-left"><h2>Notices</h2>
<p>
We do require your feedback to improve our themes and tutorials, please 

leave your comments good or bad.
</p>
<p>
<strong>Code disclaimer information</strong>
</p>
<p>
If 

this document contains programming examples, www.DigitalRaindrops.net grants you a 

nonexclusive copyright license to use all programming code from which you can generate 

similar functions tailored to your own specific needs.
</p>
<p>
<strong>All sample code is 

provided by http://DigitalRaindrops.net for learning illustrative purposes only.</strong>
</p>
<p>
These examples have not been thoroughly tested under all conditions. 

www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, 

or function of these examples. 
</p>
<p>
All programs contained herein are provided to you “AS 

IS” without any warranties of any kind. The implied warranties of non-infringement, 

merchantability and fitness for a particular purpose are expressly disclaimed.
</p>
<h2>Membership</h2>
<p>
Registration is now open: <a 

href="http://digitalraindrops.net/register/">New Member Registration</a>
</p>
<p>
Membership is 

now open: <a href="http://digitalraindrops.net/login/">Existing Member Login</a>
</p>
<p>
Visit 

the: <a href="href="http://digitalraindrops.net/members/">Forum and Feedback</a>
</p>
<p>
This 

website is a tool to support and promote WordPress and Artisteer theme development, please 

support, share and give credit for any benefits you gain from the tutorials on this website.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/wp-test/index.php/2011/06/change-category-sort-order/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing Background at Night</title>
		<link>http://digitalraindrops.net/wp-test/index.php/2011/06/changing-background-at-night/</link>
		<comments>http://digitalraindrops.net/wp-test/index.php/2011/06/changing-background-at-night/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 16:13:03 +0000</pubDate>
		<dc:creator>Digital Raindrops</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Change Background at night]]></category>
		<category><![CDATA[change background by month]]></category>
		<category><![CDATA[change background by seasom]]></category>
		<category><![CDATA[change background by time]]></category>
		<category><![CDATA[child themes tutorials]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[How-to WordPress]]></category>
		<category><![CDATA[Twenty Ten]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/?p=3340</guid>
		<description><![CDATA[We have been looking at changing the body background on a theme based on hour, day, month, or season, in this example we will find out how to change the background in the evening. We are using a Twenty Ten child theme &#8230; <a href="http://digitalraindrops.net/wp-test/index.php/2011/06/changing-background-at-night/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We have been looking at changing the body background on a theme based on hour, day, month, or season, in this example we will find out how to change the background in the evening.</p>
<p>We are using a Twenty Ten child theme to do this, so what do we need, we are using two horizontal repeat <strong>.png</strong> images 1087 wide * 1120 high, one for day and one for the night, if we whanted a different set of images, for any of the other methods we would change the quantities, names and code values to suit.</p>
<p><span id="more-3340"></span></p>
<h2>The Images</h2>
<p>We have created two sample images just using <a href="http://www.serif.com/drawplus/" target="_blank">Serif DrawPlus X4</a>, and editing one of the sample templates, these images are quite simple, but will be great for testing, we will find these images in the child theme download as well.</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<p>Download the theme: [download id="71"]</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/06/day2.png"><img style="display: inline; border: 0px;" title="day2" src="http://digitalraindrops.net/wp-content/uploads/2011/06/day2_thumb.png" border="0" alt="day2" width="304" height="313" /></a> <a href="http://digitalraindrops.net/wp-content/uploads/2011/06/night2.png"><img style="display: inline; border: 0px;" title="night2" src="http://digitalraindrops.net/wp-content/uploads/2011/06/night2_thumb.png" border="0" alt="night2" width="304" height="313" /></a></div>
<h2>style.css</h2>
<p>In our stylesheet we need to add a class for each image, we have <strong>.day and .night</strong>, if we wanted seasonal images then we would have, .winter, .spring, .summer and .fall.</p>
<p>In each class we add the name of the image to use from our theme or child themes <strong>/images/</strong> folder, see we are using <strong>day.png and night.png</strong>.</p>
<pre class="brush: css; title: Code by Digital Raindrops; notranslate">
/* Our daytime Image top and center repeat horizontal */
.day
{
   background-image: url('images/day.png');
   background-repeat: repeat-x;
   background-attachment: fixed;
   background-position: top center;
}

/* Our Nightime Image top and center repeat horizontal */
.night
{
   background-image: url('images/night.png');
   background-repeat: repeat-x;
   background-attachment: fixed;
   background-position: top center;
}
</pre>
<p>If we had only added these styles our header and content area would hide our nice images, so we need to make some parts of our themes background transparent.</p>
<div>
<div>
<div>
<pre class="brush: css; title: Code by Digital Raindrops; notranslate">
/* Menu, Main Content area and Sidebars backgrounds */
#wrapper,
#access,
#primary,
#secondary{
   background: transparent;
}

/* Lets change the stick post format */
.home .sticky{
   background: transparent;
   border: solid 1px #555;
}

/* The menu Text Color */
#access a {
   color: #333;
}

/* Hide the header image */
#branding img {
   display: none;
}

/* And this is that black bar at the foot of the theme */
#colophon {
   border: none;
}
</pre>
<h2>functions.php</h2>
<div>
<div>
<p>What we will do now is add a new function in the <strong>functions.php</strong> file, this will tell WordPress to load a different <strong>body background image</strong> based on the time of day, this will use the local time.</p>
<div>
<div>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
add_filter('body_class','day_body_class');
function day_body_class($classes = '') {
  /* pages Day and Night are for testing */
  if( is_page('Day') ) {
    $classes[] = 'day';
    return $classes;
  }
  elseif( is_page('Night')) {
    $classes[] = 'night';
    return $classes;
  }else{
    /* Get the Hour and 18hrs (6:00pm) to 07hrs (7:00am) is Night */
    $h = date('H');
    if( $h &gt; 18  || $h &lt; 07 ) {
      $classes[] = 'night';
      return $classes;
    }
    $classes[] = 'day';
    return $classes;
  }
}
</pre>
<div>
<h2>Our Theme</h2>
<p>We have added a little extra code so we can test our theme, we can create a page called <strong>‘Day’</strong> and One Called <strong>‘Night’</strong> test our theme and delete the pages.</p>
<p>This is what we will see from 7:00am see the code <strong>$h &lt; 07,</strong> that could be changed to whatever we wanted, our example will start from <strong>07:00 or 7:00am</strong>.</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/06/webday.png"><img style="display: inline; border: 0px;" title="web-day" src="http://digitalraindrops.net/wp-content/uploads/2011/06/webday_thumb.png" border="0" alt="web-day" width="654" height="576" /></a></div>
<p>The night background is triggered by <strong>$h &gt; 18</strong> which is greater than 18:00hrs or 6:00pm, so this will not change until <strong>19:00 or 7:00pm</strong></p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/06/webnight.png"><img style="display: inline; border: 0px;" title="web-night" src="http://digitalraindrops.net/wp-content/uploads/2011/06/webnight_thumb.png" border="0" alt="web-night" width="654" height="554" /></a></div>
<h2>Seasonal Code</h2>
<p>If we wanted seasonal images instead we would add <strong>four images,</strong> and then adjust the above code, in the <strong>style.css</strong> stylesheet we would need to add four classes.</p>
<pre class="brush: css; title: Code by Digital Raindrops; notranslate">
.winter
{
  background-image: url('images/winter.png');
  background-repeat: repeat-x;
  background-attachment: fixed;
  background-position: top center;
}
.spring
{
  background-image: url('images/spring.png');
  background-repeat: repeat-x;
  background-attachment: fixed;
  background-position: top center;
}
.summer
{
  background-image: url('images/summer.png');
  background-repeat: repeat-x;
  background-attachment: fixed;
  background-position: top center;
}
.fall
{
  background-image: url('images/fall.png');
  background-repeat: repeat-x;
  background-attachment: fixed;
  background-position: top center;
}
</pre>
<div>
<div>
<p>And in the <strong>functions.php</strong> we would need to <strong>select which hemisphere</strong> we want our seasons to be based on, this would be looking at the most website traffic, or target market countries.</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
add_filter('body_class','seasonal_body_class');
function seasonal_body_class($classes = '') {
   // Change to southern if appropriate
   $hemisphere = 'northern';
   $m = date('m');
   /*** southern hemisphere seasons ***/
   $southern=array(
     'summer' =&gt; array(12, 1, 2),
     'fall' =&gt; array(3, 4, 5),
     'winter' =&gt; array(6, 7, 8),
     'spring' =&gt; array(9, 10, 11)
   );

   /*** northern hemisphere seasons ***/
   $northern=array(
     'summer' =&gt; array(6, 7, 8),
     'fall' =&gt; array(9, 10, 11),
     'winter' =&gt; array(12, 1, 2),
     'spring' =&gt; array(3, 4, 5)
   );

   /*** To random test remove the remarks for a random month ***/
   // $m = mt_rand( 1, 12 );

   /*** loop over the hemisphere ***/
   foreach($$hemisphere as $key=&gt;$val) {
     if(in_array($m, $val)) {
       $classes[] = $key;
       return $classes;
     }
   }
   //No month selected from array
   $classes[] = '';
   return $classes;
}
</pre>
<p>See the line <strong>// $m = mt_rand( 1, 12 );</strong> for testing we just remove the remarks // then just refresh the browser to see random different seasons, we could use this code for a <strong>random background effect</strong>, pretty cool!</p>
<p>We hope this post and the download will help you and add to your develpment toolkit.</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<div class="adtext-left"><h2>Notices</h2>
<p>
We do require your feedback to improve our themes and tutorials, please 

leave your comments good or bad.
</p>
<p>
<strong>Code disclaimer information</strong>
</p>
<p>
If 

this document contains programming examples, www.DigitalRaindrops.net grants you a 

nonexclusive copyright license to use all programming code from which you can generate 

similar functions tailored to your own specific needs.
</p>
<p>
<strong>All sample code is 

provided by http://DigitalRaindrops.net for learning illustrative purposes only.</strong>
</p>
<p>
These examples have not been thoroughly tested under all conditions. 

www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, 

or function of these examples. 
</p>
<p>
All programs contained herein are provided to you “AS 

IS” without any warranties of any kind. The implied warranties of non-infringement, 

merchantability and fitness for a particular purpose are expressly disclaimed.
</p>
<h2>Membership</h2>
<p>
Registration is now open: <a 

href="http://digitalraindrops.net/register/">New Member Registration</a>
</p>
<p>
Membership is 

now open: <a href="http://digitalraindrops.net/login/">Existing Member Login</a>
</p>
<p>
Visit 

the: <a href="href="http://digitalraindrops.net/members/">Forum and Feedback</a>
</p>
<p>
This 

website is a tool to support and promote WordPress and Artisteer theme development, please 

support, share and give credit for any benefits you gain from the tutorials on this website.
</p></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/wp-test/index.php/2011/06/changing-background-at-night/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Meet up Group in London</title>
		<link>http://digitalraindrops.net/wp-test/index.php/2011/05/wordpress-meet-up-group-in-london/</link>
		<comments>http://digitalraindrops.net/wp-test/index.php/2011/05/wordpress-meet-up-group-in-london/#comments</comments>
		<pubDate>Mon, 23 May 2011 20:25:48 +0000</pubDate>
		<dc:creator>Second Author</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[London]]></category>
		<category><![CDATA[Loondon WordPress]]></category>
		<category><![CDATA[Meetup]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Social Network]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress Meetup Group]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/?p=3328</guid>
		<description><![CDATA[I have tried one or two meet up groups in London, the first one I found myself in Kings Cross in a smallish room above a bar, it was well attended and the people were very chatty and made me &#8230; <a href="http://digitalraindrops.net/wp-test/index.php/2011/05/wordpress-meet-up-group-in-london/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have tried one or two meet up groups in London, the first one I found myself in Kings Cross in a smallish room above a bar, it was well attended and the people were very chatty and made me feel at home, all the talk was marketing based and I had a few discussions on different subjects, it was good to see some of the entrepreneurial flair and niche markets being looked at.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/HiRes.jpg"><img style="display: inline; border: 0px;" title="HiRes" src="http://digitalraindrops.net/wp-content/uploads/2011/05/HiRes_thumb.jpg" border="0" alt="HiRes" width="650" height="309" /></a></p>
<p>I had a couple of chats about the Internet my website, the traffic numbers, and how could I make any money from it, but it came down to suggestions like writing an eBook, charging for downloads or pay per view posts where you start with a primer, and the visitor pays to read more.</p>
<p>This was not what I had in mind when I created Digital Raindrops, the original concept was for little digital blocks (droplets) of helpful code, a programming resource website that would be easy to manage and benefit the visitors.</p>
<p>The second was a small group of developers, these had a range of beginner to advanced, there were no real WordPress users, some small chat about different CMS systems and a few boasts of how much one could earn from website development, an exchange of business cards, many of these were Moo cards and they sit on a shelf above my computer, these meeting have left me feeling indifferent to meet up groups, they are in the evening and require leaving work sharp to get into town.</p>
<p>I am still a member of the Meet up website and received an email today about a <a href="http://www.meetup.com/London-WordPress/" target="_blank">new group just for WordPress</a> and it is in London, United Kingdom, I joined the group and will be attending meetings, the groups owner rather summed it up quite nicely.</p>
<blockquote><p>As a freelancer, I spend a lot of time isolated in my little development world. Although the internet is a fantastic tool for connecting with others, there&#8217;s no doubting the value of face to face contact.</p></blockquote>
<p>I am hoping that others will join the group and share ideas, talk about projects, and it might be a good place for people interested in WordPress to come along, it would be nice to meet any Local visitors to this website, get some face to face feedback, network a little and have a beer.</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/wp-test/index.php/2011/05/wordpress-meet-up-group-in-london/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Artisteer add Google Fonts</title>
		<link>http://digitalraindrops.net/wp-test/index.php/2011/05/artisteer-add-google-fonts/</link>
		<comments>http://digitalraindrops.net/wp-test/index.php/2011/05/artisteer-add-google-fonts/#comments</comments>
		<pubDate>Sun, 22 May 2011 10:16:55 +0000</pubDate>
		<dc:creator>Digital Raindrops</dc:creator>
				<category><![CDATA[Artisteer]]></category>
		<category><![CDATA[Artisteer 3]]></category>
		<category><![CDATA[custom fonts]]></category>
		<category><![CDATA[google fonts]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[how-to google fonts]]></category>
		<category><![CDATA[optional fonts]]></category>
		<category><![CDATA[post title font]]></category>
		<category><![CDATA[widget title font]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/2011/05/artisteer-add-google-fonts/</guid>
		<description><![CDATA[As Artisteer users one of the first things many of us do is add code to hide the titles, we often do this for the simple reason that the default fonts are safe and boring, so in this post we &#8230; <a href="http://digitalraindrops.net/wp-test/index.php/2011/05/artisteer-add-google-fonts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As Artisteer users one of the first things many of us do is add code to hide the titles, we often do this for the simple reason that the default fonts are safe and boring, so in this post we will look at adding a better Google font.</p>
<p>Cufón fonts are often the choice, but we are going to look at <a href="http://www.google.com/webfonts" target="_blank">Google Fonts</a> which has a growing library of fonts, they render in the browser nice and quick, and have an API we can talk to, so no uploading or including the fonts in our theme folders.</p>
<p><span id="more-3289"></span></p>
<h2>Artisteer</h2>
<p><a href="http://artisteer.com/" target="_blank">Artisteer</a> is a theme generator that will give us a nice acceptable <a href="http://wordpress.org/" target="_blank">WordPress</a> theme with a small amount of time and effort.</p>
<p>The price to market is reasonable, if we require to produce more than one theme, or just cannot find a theme to suit our requirements and want to make our own.</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<p>For our example we will use <strong>&#8216;Artisteer Version 3 RC&#8217;,</strong> and one of the sample themes “My Diary”, all we have done is saved it as a WordPress theme.</p>
<p>It does not matter if you do not have Artisteer, you can download the theme with the code below from this page: [download id="70"]</p>
<p>If we open the theme we can see that the font does not really suit the theme name, a diary theme may look better with a hand writing style theme heading font.</p>
<p>We could also apply the Google font to any text in our theme.</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts1.png"><img style="display: inline; border: 0px;" title="google-fonts-1" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts1_thumb.png" border="0" alt="google-fonts-1" width="654" height="375" /></a></div>
<h2>Google Fonts</h2>
<p>Lets visit the <a href="http://www.google.com/webfonts" target="_blank">Google Fonts</a> website and look for a nice handwriting font, the previews are nice and large and we have chosen a font called “Over the Rainbow”</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts2.png"><img style="display: inline; border: 0px;" title="google-fonts-2" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts2_thumb.png" border="0" alt="google-fonts-2" width="654" height="487" /></a></div>
<p>When we click on the title hyperlink we can see our <a href="http://www.google.com/webfonts/family?family=Over+the+Rainbow&amp;subset=latin" target="_blank">chosen fonts home page</a>, this will suit our diary theme.</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts3.png"><img style="display: inline; border: 0px;" title="google-fonts-3" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts3_thumb.png" border="0" alt="google-fonts-3" width="654" height="486" /></a></div>
<p>Next we click on the <a href="http://www.google.com/webfonts/preview#font-family=Over+the+Rainbow" target="_blank">Launch in Font Viewer</a> we are interested in two bits of information the Font Family ‘Over the Rainbow’ (Case Sensitive) and the font style <strong>family=Over+the+Rainbow:regular. </strong></p>
<p>This is the part after the colon <strong>:regular</strong>, we make a note of these as they will be used as defaults for our themes Options Page.</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts4.png"><img style="display: inline; border: 0px;" title="google-fonts-4" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts4_thumb.png" border="0" alt="google-fonts-4" width="654" height="592" /></a></div>
<h2>defaults.php</h2>
<p>Ok we have our font name and style so we can start to add a little code, in our themes <strong>/library/</strong> folder we open the file defaults.php.</p>
<p>Adding in the defaults for our Google font, we we can see we have the font name, and the font size, we tried different sizes over on Google fonts and decided to use 38, this can be changed as a default later.</p>
<p>We add our new defaults <strong>after the line</strong>:</p>
<p>$theme_default_options = array(</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
/* googleFont Settings */
 'theme_title_googleFont' =&gt; 0,
 'theme_title_fontName' =&gt; 'Over the Rainbow',
 'theme_title_FontStyle' =&gt; 'regular',
 'theme_title_fontBold' =&gt; 1,
 'theme_title_fontItalic' =&gt; 0,
 'theme_title_fontSize' =&gt; 38,
 'theme_title_fontSpacing' =&gt; 0,
 'theme_page_titles' =&gt; 0,
 'theme_widget_titles' =&gt; 0,
 /* googleFont Settings */
</pre>
<h2>options.php</h2>
<p>We need a theme options array for the Google &#8216;font style&#8217;, we add this in the <strong>/library/options.php </strong>this we will add <strong>before the line</strong>:</p>
<p>global $theme_options;</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">

/* Google Font Style Options */
$google_font_style_options = array(
 'regular' =&gt; 'font+name:regular',
 'bold' =&gt; 'font+name:bold'
);
</pre>
<p>After the header section of options we add our header font section, this we add <strong>before the lines.</strong></p>
<p>array(<br />
&#8216;name&#8217; =&gt; __(&#8216;Navigation Menu&#8217;, THEME_NS),</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">

/* googleFont Settings */
 array(
 'name' =&gt; __('Heading Google Font', THEME_NS),
 'type' =&gt; 'heading'
 ),

array(
 'id' =&gt; 'theme_title_googleFont',
 'name' =&gt; __('Use Google Font', THEME_NS),
 'desc' =&gt; __('Select to use Alternate Google Font', THEME_NS),
 'type' =&gt; 'checkbox'
 ),

array(
 'id' =&gt; 'theme_title_fontName',
 'name' =&gt; __('Google Font Name', THEME_NS),
 'desc' =&gt; __('Google Font Name from &lt;a href=&quot;&lt;a href=&quot;http://www.google.com/webfonts&quot;&gt;Google&quot; _mce_href=&quot;http://www.google.com/webfonts&quot;&gt;Google&quot;&gt;http://www.google.com/webfonts&quot;&gt;Google&lt;/a&gt; Web Fonts&lt;a&gt;', THEME_NS),
 'type' =&gt; 'text'
 ),

array(
 'id' =&gt; 'theme_title_FontStyle',
 'name' =&gt; __('Font Type', THEME_NS),
 'type' =&gt; 'select',
 'options' =&gt; $google_font_style_options,
 'desc' =&gt; __('the text after the colon : from the font preview EG: over+the+rainbow:&lt;b&gt;regular&lt;/b&gt;', THEME_NS),
 ),

 array(
 'id' =&gt; 'theme_title_fontSize',
 'name' =&gt; __('Font Size', THEME_NS),
 'desc' =&gt; __('Numeric Value for the Font Size', THEME_NS),
 'type' =&gt; 'numeric'
 ),

array(
 'id' =&gt; 'theme_title_fontSpacing',
 'name' =&gt; __('Font Spacing', THEME_NS),
 'desc' =&gt; __('Numeric Value for the Font Spacing % of em EG: 20 = 0.20em', THEME_NS),
 'type' =&gt; 'numeric'
 ),

array(
 'id' =&gt; 'theme_title_fontBold',
 'name' =&gt; __('Google Font Bold', THEME_NS),
 'desc' =&gt; __('Font Bold', THEME_NS),
 'type' =&gt; 'checkbox'
 ),

array(
 'id' =&gt; 'theme_title_fontItalic',
 'name' =&gt; __('Google Font Italic', THEME_NS),
 'desc' =&gt; __('Font Italic', THEME_NS),
 'type' =&gt; 'checkbox'
 ),

array(
 'id' =&gt; 'theme_page_titles',
 'name' =&gt; __('Post and Page Titles', THEME_NS),
 'desc' =&gt; __('Apply to Post and Page Titles', THEME_NS),
 'type' =&gt; 'checkbox'
 ),

array(
 'id' =&gt; 'theme_widget_titles',
 'name' =&gt; __('Widget Titles', THEME_NS),
 'desc' =&gt; __('Apply Font to Widget Titles', THEME_NS),
 'type' =&gt; 'checkbox'
 ),
 /* googleFont Settings */
</pre>
<h2>header-font.php</h2>
<p>Now  we create a <strong>new file</strong> called <strong>header-font.php</strong> in our themes folder, this is a WordPress template part that we will call from the header.php file, by using a template part the code is easy to transfer.</p>
<p>We take the options set from the theme options page add them to an array and use this to formulate the dynamic style.</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">

&lt;?php if( !theme_get_option('theme_title_googleFont') ) return; ?&gt;

&lt;?php
$font=array();
//The name of the Google Font
$font['name'] = theme_get_option('theme_title_fontName');
$font['style'] = theme_get_option('theme_title_fontStyle');
//Parameter to pass to Google Fonts
$font['parameter'] = str_replace(' ','+',$font['name']) .':' .$font['style'];
//If the fold is bold set the weight to 700 else 400
$font['bold'] = ( theme_get_option('theme_title_fontBold') ? 700 : 400 );
//If the fold is italic set the font style to italic else normal
$font['italic'] = (theme_get_option('theme_title_fontItalic' ) ? 'italic' : 'normal' );
//Set the font size in pixels
$font['size'] = theme_get_option('theme_title_fontSize');
//Set the font spacing as a % of em
$font['spacing'] = theme_get_option('theme_title_fontSpacing') / 100;
//Set the page and post titles to the Google font
$font['page'] = theme_get_option('theme_page_titles' );
$font['widget'] = theme_get_option('theme_widget_titles' );
?&gt;

&lt;link  href=&quot;&lt;a href=&quot;http://fonts.googleapis.com/css?family=&lt;?php&quot;&gt;http://fonts.googleapis.com/css?family=&lt;?php&lt;/a&gt; echo $font['parameter'] ?&gt;&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; &gt;
&lt;style&gt;
 h1.art-logo-name a{
 font-family: '&lt;?php echo $font['name']; ?&gt;', serif;
 font-size: &lt;?php echo $font['size']; ?&gt;px !important;
 font-style: &lt;?php echo $font['italic']; ?&gt;;
 font-weight: &lt;?php echo $font['bold']; ?&gt;;
 letter-spacing: &lt;?php echo $font['spacing']; ?&gt;em;
 }
 &lt;?php if ( $font['page'] ) : ?&gt;
 h2.art-postheader a{
 font-family: '&lt;?php echo $font['name']; ?&gt;', serif;
 letter-spacing: &lt;?php echo $font['spacing']; ?&gt;em;

 }
 &lt;?php endif; ?&gt;

&lt;?php if ( $font['page'] ) : ?&gt;
 .art-blockheader h3.t {
 font-family: '&lt;?php echo $font['name']; ?&gt;', serif;
 letter-spacing: &lt;?php echo $font['spacing']; ?&gt;em;
 }
 &lt;?php endif; ?&gt;
&lt;/style&gt;
</pre>
<h2>header.php</h2>
<p>In out themes <strong>header.php</strong> we add a line of code to call our new template part, and this will be <strong>before</strong> the lines for the version check.</p>
<p>&lt;?php if(WP_VERSION &lt; 3.0): ?&gt;</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
&lt;?php //Load our Google Font ?&gt;
&lt;?php get_template_part('header','font'); ?&gt;
</pre>
<h2>Theme Options</h2>
<p>Thats the code done so lets look at what we have, if we go to Admin &gt; Appearance &gt; Theme Options.</p>
<p>We can see our defaults, we have the use Google Font set as false, if we prefer the font to be deafult we would change the default to 1 in the defaults.php</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts5.png"><img style="display: inline; border: 0px;" title="google-fonts-5" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts5_thumb.png" border="0" alt="google-fonts-5" width="654" height="399" /></a></p>
<h2>Our Google Font</h2>
<p>Well there is our font, not bad but it is a little tight and could do with a little line spacing.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts6.png"><img style="display: inline; border: 0px;" title="google-fonts-6" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts6_thumb.png" border="0" alt="google-fonts-6" width="654" height="201" /></a></p>
<h2>Line Spacing</h2>
<p>When we add line spacing we do not put in the fraction but a whole number which will be divided by 100, we have done this because the Artisteer &#8216;numeric&#8217; option cannot deal with fractions.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts7.png"><img style="display: inline; border: 0px;" title="google-fonts-7" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts7_thumb.png" border="0" alt="google-fonts-7" width="654" height="294" /></a></p>
<p>That looks a lot better more like a heading when we add in the spacing, this will vary from font to font.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts9.png"><img style="display: inline; border: 0px;" title="google-fonts-9" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts9_thumb.png" border="0" alt="google-fonts-9" width="654" height="205" /></a></p>
<h2>Widget Titles Page and Post Heading</h2>
<p>Last test is to turn on the page and widget headings to use our nice Google Font.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts10.png"><img style="display: inline; border: 0px;" title="google-fonts-10" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts10_thumb.png" border="0" alt="google-fonts-10" width="654" height="296" /></a></p>
<p>Wow! how easy was that to make our Artisteer theme more interesting.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts11.png"><img style="display: inline; border: 0px;" title="google-fonts-11" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts11_thumb.png" border="0" alt="google-fonts-11" width="654" height="459" /></a></p>
<h2>A Different Font</h2>
<p>We had the Google font Style and might woner why it is there, lets look at the Google font <a href="http://www.google.com/webfonts/preview#font-family=Cabin+Sketch" target="_blank">Cabin Sketch</a> this requires that we pass Google <strong>:bold</strong> in the fonts url.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts12.png"><img style="display: inline; border: 0px;" title="google-fonts-12" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts12_thumb.png" border="0" alt="google-fonts-12" width="654" height="75" /></a></p>
<p>We just enter &#8216;Cabin Sketch&#8217; in the name and change the Font Type to bold, this is not the font weight but a Google option.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts13.png"><img style="display: inline; border: 0px;" title="google-fonts-13" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts13_thumb.png" border="0" alt="google-fonts-13" width="654" height="122" /></a></p>
<p>There we go!</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts14.png"><img style="display: inline; border: 0px;" title="google-fonts-14" src="http://digitalraindrops.net/wp-content/uploads/2011/05/googlefonts14_thumb.png" border="0" alt="google-fonts-14" width="654" height="463" /></a></p>
<h2>View Page Source</h2>
<p>Lets have a look at the page source and see what our code does:</p>
<pre class="brush: xml; title: Code by Digital Raindrops; notranslate">
&lt;link  href=&quot;&lt;a href=&quot;http://fonts.googleapis.com/css?family=Cabin+Sketch:bold&quot;&gt;http://fonts.googleapis.com/css?family=Cabin+Sketch:bold&lt;/a&gt;&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; &gt;
&lt;style&gt;
 h1.art-logo-name a{
 font-family: 'Cabin Sketch', serif;
 font-size: 38px !important;
 font-style: normal;
 font-weight: 700;
 letter-spacing: 0.2em;
 }
 h2.art-postheader a{
 font-family: 'Cabin Sketch', serif;
 letter-spacing: 0.2em;

 }

 .art-blockheader h3.t {
 font-family: 'Cabin Sketch', serif;
 letter-spacing: 0.2em;
 }
&lt;/style&gt;
</pre>
<p>Want to see a <a href="http://theme.digitalraindrops.net" target="_blank">live example</a> we are using this on a new non-artisteer theme, where we have to hard code the options, using the Artisteer Theme Options is a much more empowering solution.</p>
<p>Do not for get to like this page and spread the word!</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<div class="adtext-left"><h2>Notices</h2>
<p>
We do require your feedback to improve our themes and tutorials, please 

leave your comments good or bad.
</p>
<p>
<strong>Code disclaimer information</strong>
</p>
<p>
If 

this document contains programming examples, www.DigitalRaindrops.net grants you a 

nonexclusive copyright license to use all programming code from which you can generate 

similar functions tailored to your own specific needs.
</p>
<p>
<strong>All sample code is 

provided by http://DigitalRaindrops.net for learning illustrative purposes only.</strong>
</p>
<p>
These examples have not been thoroughly tested under all conditions. 

www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, 

or function of these examples. 
</p>
<p>
All programs contained herein are provided to you “AS 

IS” without any warranties of any kind. The implied warranties of non-infringement, 

merchantability and fitness for a particular purpose are expressly disclaimed.
</p>
<h2>Membership</h2>
<p>
Registration is now open: <a 

href="http://digitalraindrops.net/register/">New Member Registration</a>
</p>
<p>
Membership is 

now open: <a href="http://digitalraindrops.net/login/">Existing Member Login</a>
</p>
<p>
Visit 

the: <a href="href="http://digitalraindrops.net/members/">Forum and Feedback</a>
</p>
<p>
This 

website is a tool to support and promote WordPress and Artisteer theme development, please 

support, share and give credit for any benefits you gain from the tutorials on this website.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/wp-test/index.php/2011/05/artisteer-add-google-fonts/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Simple Style Changer Twenty Ten</title>
		<link>http://digitalraindrops.net/wp-test/index.php/2011/05/simple-style-changer-twenty-ten/</link>
		<comments>http://digitalraindrops.net/wp-test/index.php/2011/05/simple-style-changer-twenty-ten/#comments</comments>
		<pubDate>Sat, 21 May 2011 07:03:40 +0000</pubDate>
		<dc:creator>Second Author</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[changing stylesheets]]></category>
		<category><![CDATA[Style Switcher]]></category>
		<category><![CDATA[stylesheets]]></category>
		<category><![CDATA[Tabbed Options]]></category>
		<category><![CDATA[theme options]]></category>
		<category><![CDATA[theme swapper]]></category>
		<category><![CDATA[twenty ten child theme]]></category>
		<category><![CDATA[twenty ten tutorial]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/?p=3273</guid>
		<description><![CDATA[We answered a topic on the WordPress forum about offering the administrator a way of switching stylesheets, this we are already looking at this for a new theme we are working on for our own website. When changing styles we may not want &#8230; <a href="http://digitalraindrops.net/wp-test/index.php/2011/05/simple-style-changer-twenty-ten/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We answered a topic on the <a href="http://wordpress.org/support/" target="_blank">WordPress</a> forum about offering the administrator a way of switching stylesheets, this we are already looking at this for a <a href="http://theme.digitalraindrops.net/" target="_blank">new theme</a> we are working on for our own website.</p>
<p>When changing styles we may not want to give the administrator to many options as it is only the style that can really be changed and not the layout, there is no point in loading a stylesheet for a three column layout if the theme has only one column.</p>
<p><span id="more-3273"></span></p>
<p>We have taken our tabbed options tutorial and added three dropdowns where we can select a stylesheet, home, pages and posts, in the download there are three stylesheets included and a sample child theme for testing.</p>
<p>Download the twenty ten child theme:  [download id="69"]</p>
<h2>The Stylesheets</h2>
<p><strong> </strong>We have created a folder in the theme called <strong>/styles/</strong> and added in our three alternate stylesheets, these can only change fonts, colors and graphics not the layout of any pages.</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<p> We have also give our stylesheets friendly lowercase names like crimson.css, purple.css, blue.css, colbolt.css, this will make it easy for the theme administrator.</p>
<p>This system could also be adapted to give each user a choice without changing the whole theme.</p>
<h2>theme-options.php</h2>
<p>As we are using a child theme we have used STYLESHEETPATH this would be changed to TEMPLATEPATH if we were not using a Child Theme.</p>
<p>In the <strong>theme-options.php</strong>. we added a function to get the stylesheet names from the folder, this we load into a variable called $sa_css.</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
// Get the Stylesheets
function sa_list_styles(){
 $path = STYLESHEETPATH .'/styles/';
    $list = array();
    $dir_handle = @opendir($path) or die(&quot;Unable to open $path&quot;);
    while($file = readdir($dir_handle)){
        if($file == &quot;.&quot; || $file == &quot;..&quot;){continue;}
        $filename = explode(&quot;.&quot;,$file);
        $cnt = count($filename); $cnt--; $ext = $filename[$cnt];
  $name = $filename[0];
        if(strtolower($ext) == ('css') ) {
   $list[$name] = array( 'value' =&gt; $name, 'label' =&gt; $name );
  }
    }
    return $list;
}
$sa_css = sa_list_styles();
array_unshift($sa_css, &quot;&quot;);
</pre>
<p> </p>
<p>We then added in the stylesheet options in the general array section for switching stylesheets.</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
// Default options values
$sa_general = array(
 'default_css' =&gt; '',
 'post_css' =&gt; '',
 'page_css' =&gt; '',
 'footer_copyright' =&gt; '&amp;copy; ' . date('Y') . ' ' . get_bloginfo('name'),
 'intro_text' =&gt; '',
 'featured_cat' =&gt; '',
);
</pre>
<h2>header.php</h2>
<p>If we only wanted the one option we would have coded to get the setting and load the stylesheet like this, in the download we have used an if else statement for the different file (page) types.</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
&lt;?php
 $sa_settings = get_option( 'sa_general' );
 if( isset( $sa_settings['default_css']) &amp;&amp; $sa_settings['default_css'] ) {
  wp_register_style( 'customstyle', get_stylesheet_directory_uri() .'/styles/'.$sa_settings['default_css'] .'.css', '', '0.1' );
  wp_enqueue_style( 'customstyle' );
 }
 ?&gt;
</pre>
<h2>The Theme Options</h2>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/styles.png"><img style="display: inline; border: 0px;" title="styles" src="http://digitalraindrops.net/wp-content/uploads/2011/05/styles_thumb.png" border="0" alt="styles" width="644" height="513" /></a></p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/styles1.png"><img style="display: inline; border: 0px;" title="styles-1" src="http://digitalraindrops.net/wp-content/uploads/2011/05/styles1_thumb.png" border="0" alt="styles-1" width="644" height="222" /></a></p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/styles3.png"><img style="display: inline; border: 0px;" title="styles3" src="http://digitalraindrops.net/wp-content/uploads/2011/05/styles3_thumb.png" border="0" alt="styles3" width="644" height="217" /></a></p>
<p> <a href="http://digitalraindrops.net/wp-content/uploads/2011/05/styles21.png"><img style="display: inline; border: 0px;" title="styles-21" src="http://digitalraindrops.net/wp-content/uploads/2011/05/styles21_thumb.png" border="0" alt="styles-21" width="644" height="214" /></a></p>
<p>There we have our three styles, we hope that you have found the information here of some use, <strong>if you are a facebook user please like our pages</strong> to help spread the fan base for Digital Raindrops.</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<div class="adtext-left"><h2>Notices</h2>
<p>
We do require your feedback to improve our themes and tutorials, please 

leave your comments good or bad.
</p>
<p>
<strong>Code disclaimer information</strong>
</p>
<p>
If 

this document contains programming examples, www.DigitalRaindrops.net grants you a 

nonexclusive copyright license to use all programming code from which you can generate 

similar functions tailored to your own specific needs.
</p>
<p>
<strong>All sample code is 

provided by http://DigitalRaindrops.net for learning illustrative purposes only.</strong>
</p>
<p>
These examples have not been thoroughly tested under all conditions. 

www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, 

or function of these examples. 
</p>
<p>
All programs contained herein are provided to you “AS 

IS” without any warranties of any kind. The implied warranties of non-infringement, 

merchantability and fitness for a particular purpose are expressly disclaimed.
</p>
<h2>Membership</h2>
<p>
Registration is now open: <a 

href="http://digitalraindrops.net/register/">New Member Registration</a>
</p>
<p>
Membership is 

now open: <a href="http://digitalraindrops.net/login/">Existing Member Login</a>
</p>
<p>
Visit 

the: <a href="href="http://digitalraindrops.net/members/">Forum and Feedback</a>
</p>
<p>
This 

website is a tool to support and promote WordPress and Artisteer theme development, please 

support, share and give credit for any benefits you gain from the tutorials on this website.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/wp-test/index.php/2011/05/simple-style-changer-twenty-ten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twenty Ten Shadow Boxing</title>
		<link>http://digitalraindrops.net/wp-test/index.php/2011/05/twenty-ten-shadow-boxing/</link>
		<comments>http://digitalraindrops.net/wp-test/index.php/2011/05/twenty-ten-shadow-boxing/#comments</comments>
		<pubDate>Mon, 16 May 2011 10:20:33 +0000</pubDate>
		<dc:creator>Digital Raindrops</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[how to borders]]></category>
		<category><![CDATA[how to boxes]]></category>
		<category><![CDATA[theme borders and boxes]]></category>
		<category><![CDATA[twenty ten border]]></category>
		<category><![CDATA[twenty ten boxes]]></category>
		<category><![CDATA[WordPress 3]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/?p=3250</guid>
		<description><![CDATA[We are creating a new look for our website, which will be completed early June while looking at what we wanted we decided to use some shadows and rounded corners, the way we would do this is by creating graphics &#8230; <a href="http://digitalraindrops.net/wp-test/index.php/2011/05/twenty-ten-shadow-boxing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are creating a new look for our website, which will be completed early June while looking at what we wanted we decided to use some shadows and rounded corners, the way we would do this is by creating graphics but we want a website with as few graphics as possible.</p>
<p>We are going to use CSS3 boxes and shadows while still having an alternate for non compatible browsers, we have tested this with a twenty ten child theme.</p>
<p><span id="more-3250"></span></p>
<p>You can download the child theme here: [download id="67"]</p>
<h2>Browsers</h2>
<p>If we look at our website visitor browsers with <a href="http://www.google.com/intl/en_uk/analytics/index.html" target="_blank">Google Analytics</a> we can see that a lot of older versions are still in use, we have to think of all visitors and make sure the visitor experience is good for all, many new browsers will not have the same legacy browsers as Internet Explorer and Fire Fox.</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<p>We test with  FireFox, Google Chrome and Internet Explorer, which covers about 86% of the visitors to our website.</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow6.png"><img style="display: inline; border: 0px;" title="shadow6" src="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow6_thumb.png" border="0" alt="shadow6" width="654" height="532" /></a></div>
<p>Lets look at what percentage of older browsers are still in use, home users will likely upgrade to the latest where business users will have to look at things like the company intranet before choosing to upgrade a browser.</p>
<h2>Internet Explorer</h2>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow4.png"><img style="display: inline; border: 0px;" title="shadow4" src="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow4_thumb.png" border="0" alt="shadow4" width="654" height="395" /></a></div>
<h2>FireFox</h2>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow3.png"><img style="display: inline; border: 0px;" title="shadow3" src="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow3_thumb.png" border="0" alt="shadow3" width="654" height="417" /></a></div>
<h2>Twenty Ten</h2>
<p>We are looking at just three areas of the twenty ten theme, the menu items, the main content wrapper and the images, we are adding shadows and round corners to the menu and just shadows to the wrapper and images.</p>
<p>This is how our changes look in a compatible browser using CSS3 borders and shadows.</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow2.png"><img style="display: inline; border: 0px;" title="shadow2" src="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow2_thumb.png" border="0" alt="shadow2" width="654" height="483" /></a></div>
<p>Internet Explorer 9 has a compatibility feature so we can see how it will look in an older browsers</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow5.png"><img style="display: inline; border: 0px;" title="shadow5" src="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow5_thumb.png" border="0" alt="shadow5" width="654" height="410" /></a></div>
<p>As you can see we have re-styled the menu and menu sub items.</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow1.png"><img style="display: inline; border: 0px;" title="shadow1" src="http://digitalraindrops.net/wp-content/uploads/2011/05/shadow1_thumb.png" border="0" alt="shadow1" width="654" height="485" /></a></div>
<h2>Borders and Boxes</h2>
<p>We are not going to get into the detail about these, we think it is better to be hands on and test different setups in a test environment, if you want more information then <a href="http://www.google.co.uk/search?q=css3+borders+and+boxes&amp;rls=com.microsoft:en-gb:IE-Address&amp;ie=UTF-8&amp;oe=UTF-8&amp;sourceid=ie7&amp;rlz=1I7SVEE_en&amp;redir_esc=&amp;ei=8vPQTZ2REsSo8QOB7snkDQ" target="_blank">Google is a good friend</a> and there are also CSS3 style generators that will produce the compatible variations.</p>
<p>This is how one of the <a href="http://www.css3.info/preview/box-shadow/" target="_blank">box shadows</a> looks in our download stylesheet file, have a look for a css3 generator and play is the best way to discover more about box shadows, moz and webkit are different browser support.</p>
<pre class="brush: css; title: Code by Digital Raindrops; notranslate">
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
</pre>
<p>And here is a <a href="http://www.css3.info/preview/rounded-border/" target="_blank">rounded corners</a> style block used for our menu items, the standard sequence of left (8px), bottom (0), top (8px) and right (0)</p>
<pre class="brush: css; title: Code by Digital Raindrops; notranslate">
border-radius: 8px 0 8px 0;
-moz-border-radius:8px 0 8px 0;
-webkit-border-radius:8px 0 8px 0;
</pre>
<h2>style.css</h2>
<p>Here is the stylesheet from the download.</p>
<pre class="brush: css; title: Code by Digital Raindrops; notranslate">
/*
Theme Name: Twenty Ten Shadow Boxing
Theme URI: http://digitalraindrops.net/
Description: Twenty Ten Child, adding to the power of WordPress.
Author: Digital Raindrops
Author URI: http://digitalraindrops.net/
Template: twentyten
Version: 1.2
&lt;div&gt;License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
This theme, like WordPress, is licensed under the GPL.
*/

/* =Reset default browser CSS. Based on work by Eric Meyer:http://meyerweb.com/eric/tools/css/reset/index.html
-------------------------------------------------------------- */

@import url('../twentyten/style.css');

#wrapper {
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

img.size-auto,
img.size-full,
img.size-large,
img.size-medium,
.attachment img,
.gallery img {
box-shadow: 1px 3px 5px rgba(0,0,0,0.2);
-moz-box-shadow: 1px 3px 5px rgba(0,0,0,0.2);
-webkit-box-shadow: 1px 3px 5px rgba(0,0,0,0.2);
}

#access {
padding-top: 5px;
background: #fff;
}

#access .menu-header, div.menu {
margin-left: 0;
}

#access .menu-header li,
div.menu li {
color: #ccc;
border: solid 1px #f1f1f1;
margin-right: 5px;
}

#access a {
color: #444;
border-radius:8px 0px 8px 0px;
-moz-border-radius:8px 0px 8px 0px;
-webkit-border-radius:8px 0px 8px 0px;
box-shadow: 2px 3px 3px rgba(0,0,0,0.2);
-moz-box-shadow: 2px 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 2px 3px 3px rgba(0,0,0,0.2);
}

#access li:hover &gt; a,
#access ul ul :hover &gt; a {
background: #888;
color: #fff;
}

#access ul ul a {
color: #fff;
}

#access ul li.current_page_item &gt; a,
#access ul li.current-menu-ancestor &gt; a,
#access ul li.current-menu-item &gt; a,
#access ul li.current-menu-parent &gt; a {
color: #fff;
background: #666;
}

* html #access ul li.current_page_item a,
* html #access ul li.current-menu-ancestor a,
* html #access ul li.current-menu-item a,
* html #access ul li.current-menu-parent a,
* html #access ul li a:hover {
color: #fff;
background: #666;
}
</pre>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<div class="adtext-left"><h2>Notices</h2>
<p>
We do require your feedback to improve our themes and tutorials, please 

leave your comments good or bad.
</p>
<p>
<strong>Code disclaimer information</strong>
</p>
<p>
If 

this document contains programming examples, www.DigitalRaindrops.net grants you a 

nonexclusive copyright license to use all programming code from which you can generate 

similar functions tailored to your own specific needs.
</p>
<p>
<strong>All sample code is 

provided by http://DigitalRaindrops.net for learning illustrative purposes only.</strong>
</p>
<p>
These examples have not been thoroughly tested under all conditions. 

www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, 

or function of these examples. 
</p>
<p>
All programs contained herein are provided to you “AS 

IS” without any warranties of any kind. The implied warranties of non-infringement, 

merchantability and fitness for a particular purpose are expressly disclaimed.
</p>
<h2>Membership</h2>
<p>
Registration is now open: <a 

href="http://digitalraindrops.net/register/">New Member Registration</a>
</p>
<p>
Membership is 

now open: <a href="http://digitalraindrops.net/login/">Existing Member Login</a>
</p>
<p>
Visit 

the: <a href="href="http://digitalraindrops.net/members/">Forum and Feedback</a>
</p>
<p>
This 

website is a tool to support and promote WordPress and Artisteer theme development, please 

support, share and give credit for any benefits you gain from the tutorials on this website.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/wp-test/index.php/2011/05/twenty-ten-shadow-boxing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Artisteer Home Menu Image</title>
		<link>http://digitalraindrops.net/wp-test/index.php/2011/05/artisteer-home-menu-image/</link>
		<comments>http://digitalraindrops.net/wp-test/index.php/2011/05/artisteer-home-menu-image/#comments</comments>
		<pubDate>Wed, 11 May 2011 11:39:01 +0000</pubDate>
		<dc:creator>Digital Raindrops</dc:creator>
				<category><![CDATA[Artisteer]]></category>
		<category><![CDATA[Artisteer 3]]></category>
		<category><![CDATA[custom menu items]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[how-to menu items]]></category>
		<category><![CDATA[Menu Icon]]></category>
		<category><![CDATA[Menu Image]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://digitalraindrops.net/?p=3237</guid>
		<description><![CDATA[A question was asked on creating a home image instead of a text link in the menu, using Artisteer Version 3 RC, this should not be hard to do so lets have a look at how we can achieve this. &#8230; <a href="http://digitalraindrops.net/wp-test/index.php/2011/05/artisteer-home-menu-image/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A question was asked on creating a home image instead of a text link in the menu, using Artisteer Version 3 RC, this should not be hard to do so lets have a look at how we can achieve this.</p>
<p>We will use two new images the height of our menu and 60px wide, this will be different on different themes, we may want an home image a couple of chevrons [&gt;&gt;] or a clickable small logo image, but when we design our menu we must consider this.</p>
<div>
<p><span id="more-3237"></span></p>
<h2>Home Images</h2>
<p>For our example we are going to use our <a href="http://digitalraindrops.net/investica/" target="_blank">Investica theme</a> there is a download in the last part of the series you could follow along if you do not have a theme already.</p>
<div>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
</div>
<p>In any <a href="http://wordpress.org/" target="_blank">WordPress</a> exported <a href="http://artisteer.com/" target="_blank">Artisteer</a> theme we will find the style.css, before we can create our menu images we will look to see the height of the menu items, we can see that ours is 43px;</p>
<pre class="brush: css; title: Code by Digital Raindrops; notranslate">
/* begin MenuItem */
.art-hmenu a
{
position: relative;
display: block;
overflow: hidden;
height: 43px;
cursor: pointer;
font-weight: bold;
font-size: 14px;
text-align: left;
text-decoration: none;
text-transform: uppercase;
}
</pre>
<p>&nbsp;</p>
<p>Opening the images folder we will find a png image called <strong>menuitem.png,</strong> looking at this we can see the three states of our menu items, the top bar is normal, the second is hover and the last is active, we are creating just two states, normal and active.</p>
<div><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/menuitem.png"><img style="display: inline; border: 0px;" title="menuitem" src="http://digitalraindrops.net/wp-content/uploads/2011/05/menuitem_thumb.png" border="0" alt="menuitem" width="650" height="224" /></a></div>
<p>&nbsp;</p>
<p>How we create these images will depend on our theme, we created two images for our theme, <strong>menu-home.png</strong> and<strong> home-active.png</strong> and we made the width at 60px.</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/home.png"><img style="display: inline; border: 0px;" title="home" src="http://digitalraindrops.net/wp-content/uploads/2011/05/home_thumb.png" border="0" alt="home" width="64" height="47" /></a> <a href="http://digitalraindrops.net/wp-content/uploads/2011/05/homeactive.png"><img style="display: inline; border: 0px;" title="home-active" src="http://digitalraindrops.net/wp-content/uploads/2011/05/homeactive_thumb.png" border="0" alt="home-active" width="64" height="47" /></a></p>
<h2>style.css</h2>
<p>For our images to appear in the menu we will need a new class for these so we can style them, we open style.css and add at the end of the file, notice the background url and the other attributes.</p>
<pre class="brush: css; title: Code by Digital Raindrops; notranslate">
/* begin Home MenuItem */
.menu-home {
position: relative;
display: block;
overflow: hidden;
height: 43px;
width: 60px;
cursor: pointer;
background: url('images/home.png');
}
.home-active {
position: relative;
display: block;
overflow: hidden;
height: 43px;
width: 60px;
cursor: pointer;
background: url('images/home-active.png');
}
</pre>
<h2>navigation.php</h2>
<p>Artisteer have made it easy for us to apply these classes we only need to adjust two lines of code in the file <strong>/library/navigation.php</strong></p>
<p>The position of these lines may be different in other Artisteer themes so we will show the line and the change, first we do not want any text on our home menu images.</p>
<p>We find the line that populates the home caption or title and sets the menu class.</p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
$title = theme_get_option('theme_menu_homeCaption');
$active = is_home();
$items[] = new theme_MenuItem(array(
'id' =&gt; 'home',
'active' =&gt; $active,
'attr' =&gt; array('class' =&gt; ($active ? 'active' : ' '), 'href' =&gt; get_home_url(), 'title' =&gt; $title),
'title' =&gt; $title,
));
</pre>
<p>&nbsp;</p>
<p>We want to remove the last part of this line <strong>‘title’</strong> and return an empty string, and also the menu class in the array <strong>&#8216;attr&#8217;</strong>, where we change the class from <strong>&#8216; &#8216;</strong> to <strong>menu-home</strong> and the active class from <strong>&#8216;active&#8217;</strong> to  <strong>&#8216;home-active&#8217;</strong></p>
<pre class="brush: php; title: Code by Digital Raindrops; notranslate">
$title = theme_get_option('theme_menu_homeCaption');
$active = is_home();
$items[] = new theme_MenuItem(array(
'id' =&gt; 'home',
'active' =&gt; $active,
'attr' =&gt; array('class' =&gt; ($active ? 'home-active' : 'menu-home'), 'href' =&gt; get_home_url(), 'title' =&gt; $title),
'title' =&gt; '',
));
</pre>
<p>&nbsp;</p>
<p>That is it all we need to do is test our changes, where we can see our active home image.</p>
<p><strong>NOTE:</strong> this only works if we are not using a custom menu as the Artisteer home menu item is <strong>not included in the custom menu</strong>.</p>
<p>&nbsp;</p>
<p><a href="http://digitalraindrops.net/wp-content/uploads/2011/05/homemenu.png"><img style="display: inline; border: 0px;" title="home-menu" src="http://digitalraindrops.net/wp-content/uploads/2011/05/homemenu_thumb.png" border="0" alt="home-menu" width="654" height="496" /></a></p>
<p>&nbsp;</p>
<div class="adtext-center"><div style="display:inline"><script type="text/javascript"><!--
google_ad_client = "ca-pub-3167264956499614";
/* 300x250, cms-lite */
google_ad_slot = "4416136920";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></div>
<div class="adtext-left"><h2>Notices</h2>
<p>
We do require your feedback to improve our themes and tutorials, please 

leave your comments good or bad.
</p>
<p>
<strong>Code disclaimer information</strong>
</p>
<p>
If 

this document contains programming examples, www.DigitalRaindrops.net grants you a 

nonexclusive copyright license to use all programming code from which you can generate 

similar functions tailored to your own specific needs.
</p>
<p>
<strong>All sample code is 

provided by http://DigitalRaindrops.net for learning illustrative purposes only.</strong>
</p>
<p>
These examples have not been thoroughly tested under all conditions. 

www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, 

or function of these examples. 
</p>
<p>
All programs contained herein are provided to you “AS 

IS” without any warranties of any kind. The implied warranties of non-infringement, 

merchantability and fitness for a particular purpose are expressly disclaimed.
</p>
<h2>Membership</h2>
<p>
Registration is now open: <a 

href="http://digitalraindrops.net/register/">New Member Registration</a>
</p>
<p>
Membership is 

now open: <a href="http://digitalraindrops.net/login/">Existing Member Login</a>
</p>
<p>
Visit 

the: <a href="href="http://digitalraindrops.net/members/">Forum and Feedback</a>
</p>
<p>
This 

website is a tool to support and promote WordPress and Artisteer theme development, please 

support, share and give credit for any benefits you gain from the tutorials on this website.
</p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://digitalraindrops.net/wp-test/index.php/2011/05/artisteer-home-menu-image/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
