<?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>Theme Heven &#187; WP Tutorial</title>
	<atom:link href="http://www.themeheven.com/category/wordpress-tips/wordpress-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.themeheven.com</link>
	<description>WordPress, Ajax, Jquery, Web 2.0, PHP, Tutorials, Tips, Tricks</description>
	<lastBuildDate>Wed, 13 Jan 2010 09:37:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Useful Wordpress Tricks to Make Your Theme Even Better</title>
		<link>http://www.themeheven.com/2009/05/useful-wordpress-tricks-to-make-your-theme-even-better/</link>
		<comments>http://www.themeheven.com/2009/05/useful-wordpress-tricks-to-make-your-theme-even-better/#comments</comments>
		<pubDate>Mon, 04 May 2009 15:14:47 +0000</pubDate>
		<dc:creator>themeheven</dc:creator>
				<category><![CDATA[HOW TO]]></category>
		<category><![CDATA[WP Tutorial]]></category>
		<category><![CDATA[WP-Hacks]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress tricks]]></category>

		<guid isPermaLink="false">http://www.themeheven.com/?p=166</guid>
		<description><![CDATA[You can find the some of the best Wordpress Tricks to Make your theme even better here. For further tricks you can see the original post here. I have found some of the tricks are better so they are listing below for you: 
How to Disable Commenting on Posts Older Than 1 Month
A great way [...]]]></description>
			<content:encoded><![CDATA[<p>You can find the some of the best Wordpress Tricks to Make your theme even better here. For further tricks you can see the <a href="http://forthelose.org/15-useful-wordpress-tips-to-make-your-theme-even-better" target="_blank">original post here</a>. I have found some of the tricks are better so they are listing below for you: </p>
<h2>How to Disable Commenting on Posts Older Than 1 Month</h2>
<p>A great way to reduce the amount of spam you receive is to disable the ability to comment on posts that are more than 1 month old. Just paste the following in your functions.php file. Note: To change the amount of time from 1 month, just replace 30 (days) with any number of days you want.</p>
<p>
<pre><code>&lt;?phpfunction close_comments( $posts ) {	if ( !is_single() ) { return $posts; }	if ( time() - strtotime( $posts[0]-&gt;post_date_gmt ) &gt; ( 30 * 24 * 60 * 60 ) ) {		$posts[0]-&gt;comment_status = 'closed';		$posts[0]-&gt;ping_status    = 'closed';	}	return $posts;}add_filter( 'the_posts', 'close_comments' );?&gt;</code></pre>
</p>
<h2>How to Display a List of Allowed HTML Tags for Use in Comments</h2>
<p>Ever been to a blog where you&#8217;ve seen a list of all of the allowed HTML tags right above the comment form? Ever wonder how to do that in Wordpress? Well, wonder no more.</p>
<p>
<pre><code>You may use: &lt;?php echo allowed_tags(); ?&gt;.</code></pre>
</p>
<h2>How to Display the Total Number of Posts on Your Blog</h2>
<p>A useful code snippet that displays how many posts you&#8217;ve made.</p>
<p>
<pre><code>&lt;?php $numposts = $wpdb-&gt;get_var(&quot;SELECT count(*) FROM $wpdb-&gt;posts WHERE post_status = 'publish' AND post_type = 'post'&quot;);if (0 &lt; $numposts)     $numposts = number_format($numposts);echo $numposts.' posts.';?&gt;</code></pre>
</p>
<h2>How to Add a Simple &quot;Tweet This&quot; Link to Each Post</h2>
<p>Twitter is getting more and more popular each day. To make this benefit you, why not add a nice little &quot;Tweet This&quot; button to each blog post? Put this somewhere in The Loop in single.php.</p>
<p>
<pre><code>&lt;a href=&quot;http://twitter.com/home?status=I just read &lt;?php the_permalink(); ?&gt;&quot; title=&quot;Send this page to Twitter!&quot; target=&quot;_blank&quot;&gt;Tweet This!&lt;/a&gt;</code></pre>
</p>
<h2>How to Separate Trackbacks / Pingbacks and Actual Comments</h2>
<p>The comment area of your posts should be a place where your readers can talk and discuss things with you and eachother. It&#8217;s annoying if this discussion is interrupted by a few trackback announcements. Tidy up the comment area by putting the comments in one pile and the trackbacks in another.</p>
<p>
<pre><code>&lt;?php if ( $comments ) : ?&gt;&lt;?php foreach ($comments as $comment) : ?&gt;&lt;?php $comment_type = get_comment_type(); ?&gt;&lt;?php if($comment_type == 'comment') { ?&gt;

&lt;!-- It's a comment --&gt;&lt;!-- Comment content goes here --&gt;

&lt;?php } else { $trackback = true; }?&gt; &lt;?php endforeach; ?&gt;&lt;?php if ($trackback == true) { ?&gt;

&lt;!-- It's a trackback --&gt;  &lt;ol id=&quot;trackbacks-ol&quot;&gt;	  &lt;?php foreach ($comments as $comment) : ?&gt;	  &lt;?php $comment_type = get_comment_type(); ?&gt;	  &lt;?php if($comment_type != 'comment') { ?&gt;	  &lt;li&gt;		&lt;?php comment_author_link() ?&gt;	&lt;/li&gt;	  &lt;?php } ?&gt;	  &lt;?php endforeach; ?&gt;  &lt;/ol&gt;

&lt;?php } ?&gt;&lt;?php else : ?&gt;&lt;?php endif; ?&gt;</code></pre>
</p>
<p>&nbsp;</p>
<h3>See Also Following Topics:</h3>
<ul class="related_post">
<li><a href="http://www.themeheven.com/2009/05/wordpress-highlight-admin-comments/" title="WordPress highlight author comments">WordPress highlight author comments</a></li>
<li><a href="http://www.themeheven.com/2009/04/how-toshowing-subcategories-on-wordpress-category-pages/" title="How to: Showing subcategories on WordPress category pages">How to: Showing subcategories on WordPress category pages</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-tips-and-tricks/" title="Wordpress Tips and Tricks">Wordpress Tips and Tricks</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-display-category-in-menu/" title="WordPress Display Category in Menu">WordPress Display Category in Menu</a></li>
<li><a href="http://www.themeheven.com/2009/03/display-wordpress-content-outside-of-your-blog/" title="Display Wordpress content outside of your blog">Display Wordpress content outside of your blog</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.themeheven.com/2009/05/useful-wordpress-tricks-to-make-your-theme-even-better/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress highlight author comments</title>
		<link>http://www.themeheven.com/2009/05/wordpress-highlight-admin-comments/</link>
		<comments>http://www.themeheven.com/2009/05/wordpress-highlight-admin-comments/#comments</comments>
		<pubDate>Mon, 04 May 2009 14:33:11 +0000</pubDate>
		<dc:creator>themeheven</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WP Tutorial]]></category>
		<category><![CDATA[WP-Hacks]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WordPress Code]]></category>

		<guid isPermaLink="false">http://www.themeheven.com/?p=162</guid>
		<description><![CDATA[A while ago I was looking around for how to make my own comments a different color on my blog. Most of the advice was along the lines of “Add code to check if the commenter’s email is the same as the email address of the blog’s author.” Can you spot the flaw in that [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I was looking around for how to make my own comments a different color on my blog. Most of the advice was along the lines of “Add code to check if the commenter’s email is the same as the email address of the blog’s author.” Can you spot the flaw in that logic? If a commenter knows the email address of the blog author, she could use the blog owner’s email address in her comment and get her own comment highlighted. Worse yet, someone could try to discover the blog owner’s email address by trying lots of email addresses until they saw their comments change to a different color.</p>
<p>So I dug a little deeper and found a good answer on this <a href="http://wordpress.org/support/topic/145946#post-657081" target="_blank">support thread</a>. The trick is simple: instead of checking the author’s email address, check their user id to see if it’s the user id of the blog owner. Pretty smart. After that, it was a simple matter of</p>
<p><strong>1. Changing my theme to add an “authcomment” style </strong></p>
<p>I edited style.css and near the bottom added these lines:</p>
<pre><code>.authcomment {
background-color: #B3FFCC !important;
}</code></pre>
<p><strong>2. Editing my comments.php file to add a little code</strong></p>
<p>My comments.php file had a line that looked like this:</p>
<pre><code>&lt;li class=”&lt;?php echo $oddcomment; ?&gt;” id=”comment… </code></pre>
<p>and I changed it to more or less look like this:</p>
<pre><code>&lt;li class=”&lt;?php

  /* Only use the authcomment class from style.css if the user_id is 1 (admin) */

  if (1 == $comment-&gt;user_id)

  $oddcomment = “authcomment”;

  echo $oddcomment;

  ?&gt;” id=”comment…</code></pre>
<p>That’s about it. Now I have a distinctive color for my own comments, so you can quickly scan a thread to see when I circle back around to leave a comment.</p>
<p><a href="http://www.dullest.com/blog/highlight-author-comments-wordpress/" target="_blank">View Original Post </a><br />
<h3>See Also Following Topics:</h3>
<ul class="related_post">
<li><a href="http://www.themeheven.com/2009/04/how-toshowing-subcategories-on-wordpress-category-pages/" title="How to: Showing subcategories on WordPress category pages">How to: Showing subcategories on WordPress category pages</a></li>
<li><a href="http://www.themeheven.com/2009/05/useful-wordpress-tricks-to-make-your-theme-even-better/" title="Useful Wordpress Tricks to Make Your Theme Even Better">Useful Wordpress Tricks to Make Your Theme Even Better</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-tips-and-tricks/" title="Wordpress Tips and Tricks">Wordpress Tips and Tricks</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-display-category-in-menu/" title="WordPress Display Category in Menu">WordPress Display Category in Menu</a></li>
<li><a href="http://www.themeheven.com/2009/03/display-wordpress-content-outside-of-your-blog/" title="Display Wordpress content outside of your blog">Display Wordpress content outside of your blog</a></li>
<li><a href="http://www.themeheven.com/2009/03/wordpress-hack-creating-a-two-tiered-navigation-menu/" title="WordPress Hack: Creating a Two-Tiered Navigation Menu">WordPress Hack: Creating a Two-Tiered Navigation Menu</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.themeheven.com/2009/05/wordpress-highlight-admin-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to: Showing subcategories on WordPress category pages</title>
		<link>http://www.themeheven.com/2009/04/how-toshowing-subcategories-on-wordpress-category-pages/</link>
		<comments>http://www.themeheven.com/2009/04/how-toshowing-subcategories-on-wordpress-category-pages/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 02:36:35 +0000</pubDate>
		<dc:creator>themeheven</dc:creator>
				<category><![CDATA[HOW TO]]></category>
		<category><![CDATA[WP Tutorial]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WordPress Code]]></category>

		<guid isPermaLink="false">http://www.themeheven.com/?p=155</guid>
		<description><![CDATA[I wanted to show the subcategories for a given category on it&#8217;s category page in the sidebar, but somehow the code for this wasn&#8217;t readily available. Basically you need to check whether there are any children, and if there are, list the categories with the current category as a parent or grandparent. The following code [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to show the subcategories for a given category on it&#8217;s category page in the sidebar, but somehow the code for this wasn&#8217;t readily available. Basically you need to check whether there are any children, and if there are, list the categories with the current category as a parent or grandparent. The following code does just that:</p>
<p>[sourcecode language="php"]</p>
<p>if (is_category()) {</p>
<p>$this_category = get_category($cat);</p>
<p>if (get_category_children($this_category-&gt;cat_ID) != &#8220;&#8221;) {</p>
<p>echo &#8221;</p>
<p>Subcategories</p>
<p>&#8220;;</p>
<p>echo &#8221;</p>
<p>&#8220;;</p>
<p>wp_list_categories(&#8217;orderby=id&amp;show_count=0&amp;title_li=</p>
<p>&amp;use_desc_for_title=1&amp;child_of=&#8217;.$this_category-&gt;cat_ID);</p>
<p>echo &#8221;</p>
<p>&#8220;;</p>
<p>}</p>
<p>}</p>
<p>[/sourcecode]</p>
<p>Have fun with it!</p>
<p><a href="http://yoast.com/showing-subcategories-on-wordpress-category-pages/" target="_blank">View Original Post </a></p>
<h2>Showing subcategories “dynamically”</h2>
<p>This piece of code is actually a response on a query on the Czech WordPress support forum, where a guy asked how to display a list of categories that are children of the just active (browsed) one. I didn&#8217;t have a clue, although I thought this could be a very common request: on many pages you can see the category navigation that after the activation of one particular item gets more concrete, to put it differently, the subcategories are shown as an offer while browsing a category.</p>
<pre><code>&lt;?php
// outputs usual category-list
wp_list_categories('title_li=&lt;h2&gt;Categories&lt;/h2&gt;');
// outputs subcategories in same way, if there are any (if you're browsing a parental category)
$has_children = (bool)(get_category_children(intval(get_query_var('cat'))));
if (is_category() AND $has_children) {
  wp_list_categories('title_li=&lt;h2&gt;Subcategories&lt;/h2&gt;&amp;child_of=' . intval(get_query_var('cat')));

  }
?&gt;</code></pre>
<p>For more comfortable testing I recommend to add hide_empty=0 paramater and perhaps $has_children variable needs an explaining note: It&#8217;s here because a try to output the list of subcategories can end with an visible error, if there are found no subcategories (= if you would try to show subcategories of a category having not a one children <img src='http://www.themeheven.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ).</p>
<p><a href="http://kahi.cz/wordpress/showing-subcategories-dynamically/" target="_blank">View Original Post </a><br />
<h3>See Also Following Topics:</h3>
<ul class="related_post">
<li><a href="http://www.themeheven.com/2009/05/wordpress-highlight-admin-comments/" title="WordPress highlight author comments">WordPress highlight author comments</a></li>
<li><a href="http://www.themeheven.com/2009/05/useful-wordpress-tricks-to-make-your-theme-even-better/" title="Useful Wordpress Tricks to Make Your Theme Even Better">Useful Wordpress Tricks to Make Your Theme Even Better</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-tips-and-tricks/" title="Wordpress Tips and Tricks">Wordpress Tips and Tricks</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-display-category-in-menu/" title="WordPress Display Category in Menu">WordPress Display Category in Menu</a></li>
<li><a href="http://www.themeheven.com/2009/03/display-wordpress-content-outside-of-your-blog/" title="Display Wordpress content outside of your blog">Display Wordpress content outside of your blog</a></li>
<li><a href="http://www.themeheven.com/2009/03/wordpress-hack-creating-a-two-tiered-navigation-menu/" title="WordPress Hack: Creating a Two-Tiered Navigation Menu">WordPress Hack: Creating a Two-Tiered Navigation Menu</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.themeheven.com/2009/04/how-toshowing-subcategories-on-wordpress-category-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digital Photography Tutorial and Tips</title>
		<link>http://www.themeheven.com/2009/04/digital-photography-tutorial-and-tips/</link>
		<comments>http://www.themeheven.com/2009/04/digital-photography-tutorial-and-tips/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 02:09:21 +0000</pubDate>
		<dc:creator>themeheven</dc:creator>
				<category><![CDATA[WP Tutorial]]></category>
		<category><![CDATA[digital photography]]></category>

		<guid isPermaLink="false">http://www.themeheven.com/?p=152</guid>
		<description><![CDATA[Understanding Digital Camera Sensors
A digital camera uses a sensor array of millions of tiny pixels in order to produce the final image. When you press your camera&#8217;s shutter button and the exposure begins, each of these pixels has a &#8220;photosite&#8221; which is uncovered to collect and store photons in a cavity. Once the exposure finishes, [...]]]></description>
			<content:encoded><![CDATA[<h2>Understanding Digital Camera Sensors</h2>
<p>A digital camera uses a sensor array of millions of tiny pixels in order to produce the final image. When you press your camera&#8217;s shutter button and the exposure begins, each of these pixels has a &#8220;photosite&#8221; which is uncovered to collect and store photons in a cavity. Once the exposure finishes, the camera closes each of these photosites, and then tries to assess how many photons fell into each. The relative quantity of photons in each cavity are then sorted into various intensity levels, whose precision is determined by bit depth (0 &#8211; 255 for an 8-bit image).</p>
<p><img src="http://www.cambridgeincolour.com/tutorials/graphics/tut_sensors_grid2.png" alt="" /><img src="http://www.cambridgeincolour.com/tutorials/graphics/tut_sensors_reservoirsidec.png" alt="" /></p>
<p>Each cavity is unable to distinguish how much of each color has fallen in, so the above illustration would only be able to create grayscale images. To capture color images, each cavity has to have a filter placed over it which only allows penetration of a particular color of light. Virtually all current digital cameras can only capture one of the three primary colors in each cavity, and so they discard roughly 2/3 of the incoming light. As a result, the camera has to approximate the other two primary colors in order to have information about all three colors at every pixel. The most common type of color filter array is called a &#8220;Bayer array,&#8221; shown below.</p>
<p>A Bayer array consists of alternating rows of red-green and green-blue filters. Notice how the Bayer array contains twice as many green as red or blue sensors. Each primary color does not receive an equal fraction of the total area because the human eye is more sensitive to green light than both red and blue light. Redundancy with green pixels produces an image which appears less noisy and has finer detail than could be accomplished if each color were treated equally. This also explains why noise in the green channel is much less than for the other two primary colors (see &#8220;Understanding Image Noise&#8221; for an example).</p>
<p><img src="http://www.cambridgeincolour.com/tutorials/graphics/tut_sensors_eximage-orig.png" alt="" /><img src="http://www.cambridgeincolour.com/tutorials/graphics/tut_sensors_eximage-bayer.png" alt="" /></p>
<p>Note: Not all digital cameras use a Bayer array, however this is by far the most common setup. The Foveon sensor used in Sigma&#8217;s SD9 and SD10 captures all three colors at each pixel location. Sony cameras capture four colors in a similar array: red, green, blue and emerald green.</p>
<p><a href="http://www.cambridgeincolour.com/tutorials/camera-sensors.htm" target="_blank">Read More »</a></p>
<h2>Digital Photography Tutorial and Tips:</h2>
<p>Digital photography has become the medium of choice for both professional and amateur photographers in recent years. Most of the content of these tutorials applies equally to either digital or film photography.</p>
<p>Modern digital cameras, and film cameras, take care of the technical details for us, but because of this, rather than in spite of it, our brains are lulled into non-thinking, automatic</p>
<p>mode, we think the camera is going to do it all for us. The most important pages of this site, therefore, are the photography tutorials.</p>
<p><img src="http://www.geofflawrence.com/images/free_digital_photography_tutorial_site_image-1.jpg" alt="" /></p>
<p>On the photography tutorials page you will find an introduction to the articles which cover many aspects of photography both artistic and technical, or you can just wade in and start reading using the menu on the left.</p>
<p>If you are not a big reader or just want a &#8216;quick fix&#8217; solution to a problem, try the Top Ten Photography Tips page first.</p>
<p>I have been giving some thought recently to what you&#8217;re going to do with all those photographs that you have taken. Once you start getting some good pictures that are of interest to others there are plenty of opportunities to make a bit of money selling them online. Have a look at my article Making money from your Photographs for some ideas on how to get started.</p>
<h3>Free Photography Tips</h3>
<p><strong>1 Selection</strong></p>
<p>Select only the best of your pictures to show to others and leave the rest in the drawer. Showing someone every picture you have taken dilutes the effect of the best pictures and gets very boring. You may want to show twenty pictures of little Johnny at the park because they are all quite good and you can&#8217;t decide which are the best but, trust me, you will be better off making that decision and showing only the few good ones. &#8211; go to Selecting Photos</p>
<p><strong>2 Turn the Camera on it&#8217;s SideAt first it feels awkward holding the camera on it&#8217;s side, but it is worth getting used to. If the shape of your subject, a person or a building, fits into an upright rectangle, you waste so much picture space if you shoot in landscape. You paid for all those millions of pixels, don&#8217;t waste them. &#8211; go to Cropping and Framing</p>
<p></strong></p>
<p><strong>3 Framing</strong></p>
<p>One of the easiest ways to improve your photography is with careful attention to framing. Look into the corners of the viewfinder to see what is there. Do you need all that background? Can you get closer to your subject or zoom in? &#8211; go to Cropping and Framing</p>
<p><strong>4 Direction of LightingPhotography is all about light, the direction of the light falling on your subject is most important, you must look at your subject carefully and see how the shadows fall.</p>
<p></strong></p>
<p>If you are able to choose the time of day to shoot your pictures, try to pick a time when the sun is low in the sky, either shoot in the early morning or late afternoon. Shooting pictures of people with the sun too high in the sky, tends to mean the subject&#8217;s eyes will be in shadow and/or your subject will be squinting in the strong light, both of which tend to look horrible. A nice side effect of shooting in the early morning or late afternoon is that the colour of the light is &#8216;warmer&#8217;, reds and yellows are stronger which generally gives a more pleasing effect.</p>
<p>If you are photographing in sunlight, try to position yourself so that the sun hits your subject from the side, this will give you nice &#8216;modelling&#8217; and help create a 3D effect in the picture.</p>
<p>Sunlight behind the subject can give a very pleasing &#8216;backlight&#8217; effect but be careful that you are not getting &#8216;flare&#8217; in the lens, which degrades the contrast of the image. &#8211; go to Photography in Sunlight</p>
<p><strong>5 Direction of Lighting (2)The very worst kind of lighting is provided by the little flash fitted into all modern cameras. Not only does it give your subjects the dreaded red eyes, but also flattens all faces into shadowless featureless blobs. Use the in camera flashlight only in an emergency, when there is no other choice.</p>
<p></strong></p>
<p><strong>6 In Camera FlashWhen you have to use the in camera flash, keep your subject(s) away from walls, especially light coloured ones, if at all possible, and avoid that ugly black shadow which looks like an outline. This will not show up against a dark background.</p>
<p></strong></p>
<p><strong>7 ExposureUsing auto exposure to your advantage.</p>
<p></strong></p>
<p>If you have a modern camera, the chances are that the default metering system is &#8216;centre weighted average&#8217;, which means that, although it takes an average reading of the whole scene, it takes more notice of what is in the middle of the frame. Which is good news for us. The other good news is that it takes this reading at the time when you take &#8216;first pressure&#8217; on the button to take your picture. When you push it halfway down and it beeps at you, not only is the focus now set (on an auto focus camera) but the exposure reading is taken and the aperture and shutter speed are set. So, if your main point of interest is not in the centre of the frame, it&#8217;s a good idea to put it there temporarily while you focus and take your light reading, then move the camera whilst still holding the button halfway down and compose the picture the way you want it to be. A common use for this technique is when you are taking a close up shot of two people and there is space between their heads, if you&#8217;re not careful the camera will focus on the wall or trees behind them. If the background is very dark or very light this can alter the exposure significantly and result in faces that are too dark or too light. &#8211; go to Exposure</p>
<p><strong>8 Shutter Speeds</strong></p>
<p>When the shutter speed is important as with moving objects, it&#8217;s a good idea to set the camera to &#8216;Shutter Speed Priority&#8217; mode. This is where you select the shutter speed and the camera selects the appropriate aperture according to the light reading. &#8211; go to Shutter Speeds and Apertures</p>
<p><strong>9 Apertures</strong></p>
<p>If depth of field is important to either make sure everything is in focus or to throw some things out of focus, select the &#8216;Aperture Priority&#8217; mode on your camera. In this mode you select the aperture and the camera selects the shutter speed according to the available light. &#8211; go to Shutter Speeds and Apertures</p>
<p><strong>10 Neutral Density Filters</strong></p>
<p>If you are shooting in bright light and want to restrict the depth of field, use a neutral density filter in front of the lens to reduce the light entering the lens. These are available in different densities, 2x, 4x, 8x etc. each one cutting the light in half, quarter, eighth etc. In extreme circumstances you can screw a couple of them together. Although they are &#8216;neutral density&#8217; filters and should not effect the colour balance, if you use two or more together you might need a little colour correction at the printing stage. &#8211; go to Shutter Speeds and Apertures</p>
<p><a href="http://www.geofflawrence.com/" target="_blank">Read More »</a></p>
<h2>Photography tips for beginners</h2>
<p>This site shares some ideas to make better photos. It is intended for you as a beginning photographer or more advanced photographer. The ideas are worked out in tips for several photography subjects.</p>
<p>Before going to our own ideas from dptutorial (with oddities and extremes), you should know there is a pretty standard list of useful tips. Here what we think that every beginner should learn as basics and every advanced photographer at least should keep in mind:</p>
<p><strong>Choose a subject or message of your photo</strong>. If there is no clear real subject, nothing of graphical interest and no mood to convey, it is probably not an interesting photo.</p>
<p><strong>Remove things that don’t add to the photo</strong>. Especially if they detract from the central message. Don’t only know what to include, but also what to exclude. Find a simple background and look for balance.</p>
<p>In this example the hand of the woman below and the colorful yellow and blue shirts are distracting elements. Waiting until the hand is gone and standing a few steps more to the left, so the people in the back are out of the frame, would both improve the photo.</p>
<p><strong>Don’t be afraid to zoom in or get very close.</strong> The most common mistake is that photos are taken from too far away and that there is just too much environment that doesn’t add to the message. Filling the image with the subject underlines what the intended subject is, and removes cluttered background. It achieves simplicity.</p>
<p><strong>Don’t automatically center your subjects.</strong> Beginning photographers massively center their main subjects on their photos. This is not illogical because the photographer aims at the subject with the camera viewer. If you rather place the subject outside the center it will often result in a more dynamic composition. Experiment with that.</p>
<p>A popular guideline is the rule of thirds. Imagine the frame divided into thirds, both vertically and horizontally, like a tic-tac-toe board. Then place the subject on or near one of the lines or intersections. This is called the rule of thirds, or the ‘golden mean’. However don’t follow this rule slavishly.</p>
<p>Remember that the eyes are most important for people and animals. When zooming in and the head fills the image, the rule of thirds applies to the position of the eyes.</p>
<p><strong>Be sure to hold your camera level.</strong> It will break the strength of your photo if the horizon appears with an apparent angle.</p>
<p>Sometimes photo opportunities appear in a split second, and you have just no time to control the angle of your camera. When at home your photo appears to be tilted, no problem. With imaging tools it’s easy to level the photo afterwards. However this gives a small loss in image quality. So practise your reflex to hold your camera level in the first place.</p>
<p><strong>Eyes are exceptionally important. They tell the story.</strong> When photographing people and animals everything else can be hidden or cropped out: the mouth, the nose, the hair. But the eyes must be visible.</p>
<p>In addition, the eyes have to be tack sharp. Unsharpness of the eyes will hurt the attraction to the eyes, and with that the quality of the photo. If the eyes are not sharp, the photo doesn’t look sharp.</p>
<p><strong>Watch the distance with flash.</strong> Don’t bother using flash over 30 feet away. Most non professional flashes just completely don’t function at this distance or greater. Flash works best with nearby subjects. When taking a scenery of a bridge at some distance, flash won’t help. Instead of flash, use longer exposure times and a tripod or, if necessary, a higher iso setting.</p>
<p>When photographing multiple people with flash, be aware that persons that are close will be illuminated by the flash much more than persons further away. So if you want all of them as prominent, have all at the same close distance from your camera.</p>
<p><strong>As a rule make use the full range</strong> of luminosity: from completely dark (black) to completely white. This makes photos dynamic and vivid.</p>
<p>On the other side don’t over expose with digital camera’s. The information of over exposed parts of the image will be lost definitively and can’t even be recovered by imaging tools. Under exposing is also unfortunate. Image tools can light up the darks and make the tonal visible, however with some or even considerable noise.<br />
Directly after taking a photograph, reading the histogram can be helpful. If the histogram is pegged against the right end, the photo is over exposed. When pegged against the left hand, it is under exposed.</p>
<p>But adjusting the settings of the camera to capture the whole full range of luminosity without over or under exposing can be quite a struggle. Just be sure not to overexpose. Adjusting levels afterwards with an imaging tool will be the rescue.</p>
<p><strong>Make a selection of your photos.</strong> Don’t put all your photos, complete with all the flawed versions of the same scene, in your (online) photo album. The bad ones harm the attention that the best ones deserve. Make a critical selection of your photos, keep the very best. This will enhance your the overall quality of the album enormously.</p>
<p><strong>The tree growing out of the subject’s shoulder or head </strong>is a classic photographic syndrome.</p>
<p>As you position yourself for the photo look out for power poles, lamp posts and other objects behind the subject that can ruin your photo. When it happens, reposition yourself or the subject.</p>
<p>Also avoid objects in the background that visually merge with the subject because they have the same color. Let the subject be free-standing.</p>
<p><a href="http://www.dptutorial.com/photography-tips-for-beginners" target="_blank">Source Site</a></p>
<h2>Digital Photograpy</h2>
<p>Photoxels is first and foremost a digital photography site where you will find digital photography tutorials written in easy to understand language. Our One-Pager™ digital photography tutorials will help you select the digital camera that is best for you and make sense of difficult technical concepts.</p>
<p><img src="http://www.photoxels.com/images/Tutorial/DSC00160_200.jpg" alt="" />Each digital photography tutorial is short, can be read in one sitting, and is immensely practical &#8212; which means you can put what you have just learned to use immediately. Enjoy!</p>
<p><a href="http://www.photoxels.com/digital-photography-tutorials.html" target="_blank">Read More »</a></p>
<h2>Near Infrared Digital Photography</h2>
<p>Near infrared light consists of light just beyond visible red light (wavelengths greater than 780nm). Contrary to popular thought, near infrared photography does not allow the recording of thermal radiation (heat). Far-infrared thermal imaging requires more specialized equipment, and is not the subject of this tutorial. Infrared images exhibit a few distinct effects that give them an exotic, antique look. Plant life looks completely white because it reflects almost all infrared light (because of this effect, infrared photography is commonly used in aerial photography to analyze crop yields, pest control, etc.) The sky is a stark black because no infrared light is scattered. Human skin looks pale and ghostly. I have a photograph of a friend&#8217;s black shirt, which looks white in infrared. My dark sunglasses all but disappear in infrared because they don&#8217;t block any infrared light, and it&#8217;s said that you can capture the near infrared emissions of a common iron.</p>
<p>Infrared photography has been around for at least 70 years, but until recently has not been easily accessible to those not versed in traditional photographic processes. Since the charge-coupled devices (CCDs) used in digital cameras and camcorders are sensitive to near-infrared light, they can be used to capture infrared photos. With a filter that blocks out all visible light (also frequently called a &#8220;cold mirror&#8221; filter), most modern digital cameras and camcorders can capture photographs in infrared. In addition, they have LCD screens, which can be used to preview the resulting image in real-time, a tool unavailable in traditional photography without using filters that allow some visible (red) light through.</p>
<p>This tutorial will take you through all of the steps necessary to procure and manipulate near infrared photographs through the use of a digital camera (or camcorder). You will need:</p>
<ul>
<li>a digital camera</li>
<li> a Kodak Wratten #89B, #88A, #87, #87B, or #87C filter(in order of how much visible light they block, from low to high)</li>
<li> a tripod</li>
<li> a means to fasten the filter to your camera</li>
<li> an image editing program such as Adobe Photoshop</li>
</ul>
<p>Before we begin, you will need to check to see if your camera has an infrared blocking filter (also called a &#8220;hot mirror&#8221; filter) installed. A quick way to test this is to see if your camera can see beams emitted from a common infrared remote control. These beams seem to be fairly bright and are easily seen in a camera&#8217;s LCD preview area. If you don&#8217;t have an LCD on your camera, your only hope is to try to capture the beam by taking a picture of your remote (while depressing a button on it). If you cannot see the infrared beam, you may have to remove the infrared blocking filter by disassembling the camera. Note that this may void the warranty. Most brands of digital cameras are known to be sensitive to near infrared light.</p>
<p>Get a few different types of filters to play with. A #87C filter will filter out all visible light, but since these filters gradually filter out more and more light as the wavelength increases, the #87C will also filter out a good amount of the infrared light you&#8217;re trying to capture! I use the #87 filter because it filters out all visible light, but still lets in enough of the infrared spectrum for clear crisp images. The #25 filter lets in a significant amount of red light, and is often used in traditional photography because it allows image previewing through the viewfinder. These filters do not work well with digital cameras. Supposedly, you can buy a visible light filter from Edmund Scientific for $5, but I&#8217;m guessing that it&#8217;s not of very high optical quality. (609-573-6250, ask for a 1&#8243; diameter circular filter, part no. H43948)</p>
<p>Here&#8217;s a table of % light transmission at different wavelengths for a few of the filters specified above. You should be able to figure out the approximate behavior of the other filters by comparing them to this table.</p>
<p><a href="http://www.echeng.com/photo/infrared/tutorial/" target="_blank">Read More »</a></p>
<h2>Night photography tutorial</h2>
<p>It&#8217;s that time of year when you leave for work in the dark and return home in the evening in the dark, so it&#8217;s understandable that your camera may only surface at the weekend. But it doesn&#8217;t have to be this way. Many cameras, whether compact 35mm, digital or SLR, have a shutter speed range that will allow low-light pictures to be taken so you can venture out in the evening. The only requirement is a little knowledge of metering and some form of support to ensure that you don&#8217;t get blurred pictures as a result of camera shake.</p>
<p>The first thing to do is check that you can override the camera&#8217;s automatic flash. Most 35mm and APS compacts have a symbol that has a lightning bolt within a circle with a 45 degree line through it &#8211; just like a no entry road sign. This turns off the flash and ensures the camera makes use of its long exposure setting. You can check to see what the long shutter speed is in your camera&#8217;s instruction book. Digital cameras have a similar mode, although on models like the Nikon Coolpix 995, Sony DSC-F707 and Minolta Dimage 5 and most makes of SLR you just leave the flash in its down position and ignore the warning light telling you to activate flash.</p>
<p><img src="http://www.ephotozine.com/articles/Night-photography-tutorial-4717/images/1178105396_0.jpg" alt="" /></p>
<p><em>Blackpool is famous for its illuminations and fortunately it has a pier so you can get far enough back to shoot the illuminated tower and the sea front. Rest on the railings and step the shutter down one stop to allow for the large area of darkness that will fool the meter.</em></p>
<p><a href="http://www.ephotozine.com/article/Night-photography-tutorial-4717" target="_blank">Read More »</a></p>
<p>Photography &#8211; Lighting</p>
<p>There have been entire books written on one very small aspect of lighting or another, so to do the subject justice in just a few pages is not easy, however I will do my best.</p>
<p>Although I have divided the subject up into different categories, the lighting you &#8216;find&#8217; and the lighting you create for yourself, it is really the same thing. You need to manipulate the scene to create the effect you want, this might mean moving a light on a stand or moving your subject relative to the sun, or waiting for a better time of day to get the effect you want.</p>
<p><img src="http://www.geofflawrence.com/images/rock_chick.jpg" alt="" />I once met a landscape photographer who, having found the scene he wanted to photograph, would pitch his tent and wait for the light to be right. Sometimes this would take two or three days. I&#8217;m not sure I would have that kind of dedication and I certainly don&#8217;t have that amount of time, but it is worth spending a little time getting it right.</p>
<p><a href="http://www.geofflawrence.com/photography_tutorial_lighting.htm" target="_blank">Read More »</a><br />
<h3>Most Commented Posts</h3>
<ul class="related_post">
<li><a href="http://www.themeheven.com/2009/03/display-wordpress-content-outside-of-your-blog/" title="Display Wordpress content outside of your blog">Display Wordpress content outside of your blog</a></li>
<li><a href="http://www.themeheven.com/2009/03/top-10-magazine-wordpress-themes-from-premiumthemes/" title="Top 10 Magazine WordPress Themes from Premiumthemes">Top 10 Magazine WordPress Themes from Premiumthemes</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-meta-tags-plugin/" title="WordPress Meta-Tags Plugin">WordPress Meta-Tags Plugin</a></li>
<li><a href="http://www.themeheven.com/2009/06/simple-jquery-image-slide-show-with-semi-transparent-caption/" title="Simple JQuery Image Slide Show with Semi-Transparent Caption">Simple JQuery Image Slide Show with Semi-Transparent Caption</a></li>
<li><a href="http://www.themeheven.com/2009/06/web-2-0-and-seo/" title="Web 2.0 and SEO">Web 2.0 and SEO</a></li>
<li><a href="http://www.themeheven.com/2009/03/photoshop-tutorial-sites/" title="Photoshop Tutorial Sites">Photoshop Tutorial Sites</a></li>
<li><a href="http://www.themeheven.com/2009/04/how-to-embed-google-ad-in-your-post/" title="How to: Embed Google Ad in your post">How to: Embed Google Ad in your post</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-tips-and-tricks/" title="Wordpress Tips and Tricks">Wordpress Tips and Tricks</a></li>
<li><a href="http://www.themeheven.com/2009/04/digital-photography-tutorial-and-tips/" title="Digital Photography Tutorial and Tips">Digital Photography Tutorial and Tips</a></li>
<li><a href="http://www.themeheven.com/2009/05/useful-wordpress-tricks-to-make-your-theme-even-better/" title="Useful Wordpress Tricks to Make Your Theme Even Better">Useful Wordpress Tricks to Make Your Theme Even Better</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.themeheven.com/2009/04/digital-photography-tutorial-and-tips/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress Loop</title>
		<link>http://www.themeheven.com/2009/04/wordpress-loop/</link>
		<comments>http://www.themeheven.com/2009/04/wordpress-loop/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 03:27:10 +0000</pubDate>
		<dc:creator>themeheven</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WP Tutorial]]></category>
		<category><![CDATA[WP-Hacks]]></category>
		<category><![CDATA[Wordpress Loop]]></category>

		<guid isPermaLink="false">http://www.themeheven.com/?p=142</guid>
		<description><![CDATA[The Ultimate Guide to the WordPress Loop
In this tutorial, I’ll be going over The Loop, and how WordPress uses it to display your posts and pages. Keep in mind, this is slightly more advanced than our previous tutorials. Hopefully you will find this ultimate guide easier to understand than what’s available in the WordPress documentation. [...]]]></description>
			<content:encoded><![CDATA[<h2>The Ultimate Guide to the WordPress Loop</h2>
<p>In this tutorial, I’ll be going over The Loop, and how WordPress uses it to display your posts and pages. Keep in mind, this is slightly more advanced than our previous tutorials. Hopefully you will find this ultimate guide easier to understand than what’s available in the WordPress documentation. Here’s what we will go over:</p>
<ul>
<li>A definition of The Loop.</li>
<li> Basic flow of The Loop.</li>
<li> Template tags used in The Loop</li>
<li> What to do after The Loop</li>
<li> Template file hierarchy</li>
</ul>
<p>If you want to get a better understanding of how a WordPress theme really works behind the scenes, read on.</p>
<p>Note: This tutorial assumes you’re using a standard WordPress theme, such as the default Kubrick theme. No advanced multiple-loop stuff…yet.</p>
<h3>What is The Loop?</h3>
<p>You’re probably still wondering what The Loop even is. Basically, it’s what displays the content you see on your homepage, your single posts, pages, archives, search results, and more.</p>
<p>If a user accesses your homepage, archives, or search results &#8211; by default, the Loop will display a certain number of posts as defined in your Reading Options.</p>
<p><img src="http://imagesho.comuv.com/wploop/loop1.gif" alt="" /></p>
<p>At the moment, this loop will displays 10 posts per page, which is what I defined Show at most * posts. On single posts and pages &#8211; the same basic Loop code will just display just that specific page.</p>
<h3>Basic flow of the loop</h3>
<p>Let’s break the Loop down into 3 parts.</p>
<pre><code>&lt;?php if (have_posts()) : ?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;</code></pre>
<p>1. What you want displayed in the Loop</p>
<pre><code>&lt;?php endwhile;?&gt;</code></pre>
<p>2. What is displayed when the Loop is over</p>
<pre><code>&lt;?php else : ?&gt;</code></pre>
<p>3. If there’s nothing to display</p>
<pre><code>&lt;?php endif; ?&gt;</code></pre>
<p>If there are posts available in the query, it will start displaying them in a while loop, what is defined in part 1. When the while is over, it will display what is in part 2. If there’s no posts found, or there’s some sort of other 404 error, part 3 gets displayed.</p>
<p><a href="http://www.themelab.com/2008/04/04/the-ultimate-guide-to-the-wordpress-loop/" target="_blank">Read More&#8230;</a></p>
<h2>Define Your Own WordPress Loop Using WP_Query</h2>
<p>We all know what the <a href="http://www.themelab.com/2008/04/04/the-ultimate-guide-to-the-wordpress-loop/" target="_blank">WordPress Loop</a> is right? If not, there are many great tutorials around the web that<a href="explain%20the%20WordPress%20Loop" target="_blank"> explain the WordPress Loop</a>.</p>
<p>One of the easiest ways to navigate and manipulate the loop is to use the function called query_posts. Nathan Rice calls it a WordPress developers best friend.</p>
<p>When you use query_posts, however, you risk the following:</p>
<ul>
<li>Potential to interfere with plugins which make use of the Loop.</li>
<li> Potential to invalidate WordPress conditional tags.</li>
<li> Having to deal with resetting, rewinding, offsetting…</li>
</ul>
<p>I say skip query_posts. In a way you’ll still be using it, but the better (and sometimes easier) technique is to instantiate your own <a href="http://codex.wordpress.org/Function_Reference/WP_Query" target="_blank">WP_Query</a> object and create your own loop.</p>
<h3>Creating Your Own Loop With WP_Query</h3>
<p>The first step is to instantiate your own variable using the WP_Query class.</p>
<p>What we’ll be doing in this example is creating a common feature on blogs, which is to display a list of the recent articles.</p>
<pre><code>&lt;?php
    $recentPosts = new WP_Query();
    $recentPosts-&gt;query('showposts=5');
?&gt;</code></pre>
<p>All I’ve done in the above code is defined a variable named recentPosts and instantiated an instance of WP_Query.</p>
<p>I then used a method of WP_Query to start a query (pretty much the same thing as using query_posts). You even use the <a href="http://codex.wordpress.org/Template_Tags/query_posts#Usage" target="_blank">same usage parameters</a> as query_posts.</p>
<pre><code>&lt;?php while ($recentPosts-&gt;have_posts()) : $recentPosts-&gt;the_post(); ?&gt;
&lt;!-- do some stuff here --&gt;
&lt;?php endwhile; ?&gt;</code></pre>
<p>Notice the use of the recentPosts variable to start the loop. We utilize two methods of WP_Query, which is have_posts and the_post. You can read more about those two methods on my article Global Variables and the WordPress Loop.</p>
<p>The beauty of this is that once you are inside your own loop, you can use the standard post tags.</p>
<p><strong>The Full Code</strong></p>
<p>Here’s the full code for showing the last five recent posts using your own loop:</p>
<pre><code>&lt;h3&gt;Recent Articles&lt;/h3&gt;
&lt;ul&gt;
&lt;?php
    $recentPosts = new WP_Query();
    $recentPosts-&gt;query('showposts=5');
?&gt;
&lt;?php while ($recentPosts-&gt;have_posts()) : $recentPosts-&gt;the_post(); ?&gt;
&lt;li&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php endwhile; ?&gt;
&lt;/ul&gt;</code></pre>
<p><a href="http://weblogtoolscollection.com/archives/2008/04/13/define-your-own-wordpress-loop-using-wp_query/" target="_blank">Read More &#8230;</a></p>
<h2>Perishable Press Triple Loop for WordPress</h2>
<p>Two of the themes developed by Perishable Press, <a href="http://perishablepress.com/press/2006/01/09/apathy-theme/" target="_blank">Apathy</a> and <a href="http://perishablepress.com/press/2006/01/10/information-theme/" target="_blank">Information</a>, depend on three WordPress loops to operate as intended. For each of these themes, the three loops consist of two &#8220;side&#8221; loops and one main loop. The side loops each display posts from one specific category, while the main loop displays posts from every category not specified in the side loops.</p>
<p>There are many different multi-loop configurations currently available for WordPress users. Needless to say, despite a wide variety of available loop setups, implementing a customized multiple loop frequently requires a great deal of time of energy. Certain loop sets accomplish one task, but fail at another, while others refuse to provide enough flexibility in general. Indeed, after countless rounds of trial and error establishing multiple loops, we finally developed the almost-perfect triple-loop configuration.</p>
<pre><code>// the first loop
&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
&lt;?php if ( in_category('7') &amp;&amp; is_home() ) continue; ?&gt;
&lt;?php if ( in_category('8') &amp;&amp; is_home() ) continue; ?&gt;
&lt;?php the_title(); ?&gt;
&lt;?php the_content(); ?&gt;
&lt;?php comments_template(); ?&gt;
&lt;?php endwhile; ?&gt;
&lt;?php posts_nav_link('','','&amp;laquo; Previous') ?&gt;&lt;?php previous_post('&amp;laquo; %', '', 'yes'); ?&gt;
&lt;?php posts_nav_link('','Next &amp;raquo;','') ?&gt;&lt;?php next_post('% &amp;raquo;', '', 'yes'); ?&gt;
&lt;?php else : ?&gt;
&lt;p&gt;Sorry..&lt;/p&gt;
&lt;?php endif; ?&gt;</code></pre>
<p><a href="http://perishablepress.com/press/2006/11/22/perishable-press-triple-loop-for-wordpress/" target="_blank">Read More &#8230; </a></p>
<h2>Easily Adaptable WordPress Loop Templates</h2>
<p>In this article, I present several heavily commented examples of WordPress loops. I have found that many readers appreciate these types of loop examples, as it helps them to understand how the loop works while enabling them to easily copy, paste, and adapt the code for their own purposes. In our first example, we examine a basic WordPress loop. When implemented, this loop will display “x” number of posts, where “x” represents the number specified via the WordPress Admin reading options panel. To use this code, simply copy &amp; paste into your WordPress theme’s index.php file 1 and customize accordingly.</p>
<h3>Your Basic WordPress Loop</h3>
<pre><code>// any code included here occurs before the wordpress loop and is always displayed
&lt;?php if (have_posts()) : ?&gt;

 // if there are posts to display, process any code included here only once

  // display any code output from this region above the entire set of posts
&lt;?php while (have_posts()) : the_post(); ?&gt;

 // loop through posts and process each according to the code specified here

  // process any code included in this region before the content of each post
&lt;?php the_content(); ?&gt; // this function displays the content of each post

// process any code included in this region after the content of each post
&lt;?php endwhile; ?&gt;

// stop the post loop and process any code included here only once

  // any code output will be displayed below the entire set of posts
&lt;?php else : ?&gt;

// if there are no posts to display, process any code that is included here

  // the output of any code included here will be displayed instead of posts
&lt;?php endif; ?&gt;

// any code included here occurs after the wordpress loop and is always displayed
</code></pre>
<p><a href="http://perishablepress.com/press/2007/11/14/easily-adaptable-wordpress-loop-templates/" target="_blank">Read More &#8230;</a></p>
<h2>Coding the WordPress Loop</h2>
<p>Have you ever downloaded a WordPress theme with sloppy code?</p>
<p>There’s probably a good chance you have. Either more than 90% of themes have sloppy code or by some astronomically improbable chance, I only ever happen to download themes with sloppy code. I’m hoping to open the eyes of at least a small percentage of theme authors and help usher in a new era of neater code.</p>
<p>I’m going to break down the basics of the WordPress Loop in this post and help you write cleaner themes. I’ll explain each line of code along the way and point out references to the outside information.</p>
<p>I know. I know. A post about The Loop doesn’t sound too exciting, but maybe this is just what we need — a journey back to the basics. Take a look at the example file to see what The Loop should look like. The important thing here is not to focus on the code but to notice how the code is formatted. See the plentiful whitespace? I’d like to see more of that in themes.</p>
<h3>The first step: Opening The Loop</h3>
<p>Before we display our posts, we have to open The Loop. Most theme authors know how to get this right, which at least shows potential.</p>
<pre><code>&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;</code></pre>
<p><a href="http://justintadlock.com/archives/2009/01/23/coding-the-wordpress-loop" target="_blank">Read More &#8230;</a></p>
<h2>The WordPress Loop And Adding Content Outside Of It</h2>
<p>The WordPress loop is what controls the posts on the page. And like it’s name &#8211; it ‘loops’ the content and anything placed within the loop will be repeated until the loop ends.</p>
<p>Sometimes we’ll need to add content to a page that shouldn’t be repeated with every single post displayed (i.e. ads) and in order to do that, we need to know where the WordPress loop begins and where it ends.</p>
<p>For this example, I’ll be using the default WordPress template (Kubrick) index.php file located in the ‘[WP-INSTALL]/wp-content/themes/default/‘ folder.</p>
<p>You’ll see the loop starts around line 7* with:</p>
<pre><code>&lt;?php while (have_posts()) : the_post(); ?&gt;</code></pre>
<p>The give-away? The word ‘while’ &#8211; that is the element that tells you the WordPress loop is starting. You can add your information or content above this line and it will not be repeated with each post, instead, it will show before your posts start.</p>
<p>The loop ends around line 20 with:</p>
<pre><code>&lt;?php endwhile; ?&gt;</code></pre>
<p>The give-away? The word ‘endwhile’ &#8211; that is the element that tells you the WordPress loop is ending. You can add your information under this line and it will not be repeated with each post, instead, it will show after all of your posts.</p>
<p><a href="http://www.optiniche.com/blog/15/the-wordpress-loop-and-adding-content-outside-of-it/" target="_blank">Read More &#8230;</a></p>
<h2>Coding the WordPress Loop &#8211; Part 1</h2>
<p>There are many, many WordPress themes out there that have been coded fairly poorly, some of them are outright disgusting. So I think it is about time that we take a walk down ‘Theme Coding 101′, and go back to the basics of coding a WordPress theme.</p>
<p>This is not the only way to write the WordPress loop, however it should be used a reference point on which to base your loop on, with correct tags and code formatting.</p>
<h3>What is the Loop?</h3>
<p>Let’s imagine that you didn’t have a skeleton inside you, you basically couldn’t stand up or function, that is exactly what the WordPress loop is, the skeleton of your WordPress installation. The loop cycles through all the posts, grabbing the required data to display them, from the heading, the post content, tags and categories, plus any other information stored with each post.</p>
<pre><code>&lt;!-- Originally found at www.JustinTadlock.com --&gt;
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
&lt;div id="post-&lt;?php the_ID(); ?&gt;" &lt;?php post_class(); ?&gt;&gt;
&lt;?php the_title('&lt;h2 class="entry-title"&gt;&lt;a href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark"&gt;', '&lt;/a&gt;&lt;/h2&gt;'); ?&gt;
&lt;p class="byline"&gt;
&lt;span class="author vcard"&gt;&lt;?php the_author_posts_link(); ?&gt;&lt;/span&gt; &lt;span class="sep"&gt;|&lt;/span&gt;
&lt;abbr class="published" title="&lt;?php the_time(__('l, F jS, Y, g:i a', 'example')); ?&gt;"&gt;&lt;?php the_time(__('F j, Y', 'example')); ?&gt;&lt;/abbr&gt;
&lt;?php edit_post_link(__('Edit', 'example'), ' &lt;span class="sep"&gt;|&lt;/span&gt; &lt;span class="edit"&gt;', '&lt;/span&gt; '); ?&gt;
&lt;/p&gt;
&lt;div class="entry-content"&gt;
&lt;?php the_content(__('Continue reading', 'example')); ?&gt;
&lt;?php wp_link_pages('before=&lt;p class="pages"&gt;' . __('Pages:','example') . '&amp;after=&lt;/p&gt;'); ?&gt;
&lt;/div&gt;
&lt;p class="entry-meta"&gt;
&lt;span class="categories"&gt;&lt;?php _e('Posted in', 'example'); ?&gt; &lt;?php the_category(', '); ?&gt;&lt;/span&gt;
&lt;?php the_tags('&lt;span class="tags"&gt; &lt;span class="sep"&gt;|&lt;/span&gt; ' . __('Tagged', 'example') . ' ', ', ', '&lt;/span&gt;'); ?&gt;
&lt;span class="sep"&gt;|&lt;/span&gt; &lt;?php comments_popup_link(__('Leave a response', 'example'), __('1 Response', 'example'), __('% Responses', 'example'), 'comments-link', __('Comments closed', 'example')); ?&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;?php endwhile; ?&gt;
&lt;?php else : ?&gt;
&lt;p class="no-posts"&gt;&lt;?php _e('Sorry, no posts matched your criteria', 'example'); ?&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;</code></pre>
<h3>Starting the Loop</h3>
<p>The first and easiest part of forming a new WordPress theme.</p>
<pre><code>&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;</code></pre>
<p><a href="http://wpthoughts.com/2009/02/coding-the-wordpress-loop-1/" target="_blank">Read More &#8230;</a></p>
<h2>Understanding WordPress Loop</h2>
<p>Once you installed your WP blog, it&#8217;s just a matter of time before you hear this word: The Loop.</p>
<p>Did you install a plugin? It probably has some advanced functions to be inserted in The Loop. Do you want to insert a banner or a Google ad after the first post (or inside it)? You have to modify The Loop.</p>
<p>Do you want to fully display only the first five posts and show only the title for the remaining ones?</p>
<p>Agan, you have to modify The Loop.</p>
<p>It&#8217;s time to learn what is The Loop</p>
<p><a href="http://www.emanueleferonato.com/2008/08/06/understanding-wordpress-loop/" target="_blank">Read More &#8230;</a></p>
<h2>Embedding WordPress &#8211; Part 1 of 3 &#8211; Using “The Loop” anywhere</h2>
<p>This is the first of a three part series of tutorials explaining how to use PHP to embed WordPress content anywhere in a website without the use of &lt;iframes&gt; or other questionable methods. If you’re new to PHP, don’t be frightened, as much of the code can be simply copied from the tutorial and used with only minor modifications. If you are impatient and have knowledge of PHP and the WordPress Loop, Part 3 contains sample usage that you’ll likely find adequate.</p>
<p>Introduction:</p>
<p>I wrote these tutorials because there is a dearth of information on the web explaining how to embed WordPress content outside of the blog itself. A secondary goal of these tutorials is to dispel the myth that WordPress is unsuitable for use as a modular content management system.</p>
<p>The goal of these tutorials is to provide guidance on how to embed and use information and functions from WordPress from outside of the blog using clean, search engine friendly methods. These tutorials do not use kludges such as targeting an &lt;iframe&gt; to the WordPress blog or methods such as using PHP’s fopen() function to grab data from the blog engine. Why? Methods like using frames and iframes are inefficient, a nightmare for Search Engine Optimization and may not work on all web browsers. Using PHP’s fopen() function is better, though it still causes unnecessary load on the web server, is far from elegant and is potentially forbidden by your web host.</p>
<p>I have taken care to make certain that the information contained in these tutorials is accurate, however if there is an error, please let me know and I will revise the tutorials as needed. I hope that these tutorials are of use to the WordPress community and look forward to your comments or questions.</p>
<p><a href="http://blog.puppygrinder.com/?p=91" target="_blank">Read More &#8230;</a></p>
<h2>Using The Wordpress Loop To Display Custom Content</h2>
<p>When I first started using Wordpress and wanted to do some custom things to my theme I discovered the Template Tag system in Wordpress. At first I was overjoyed that they had decided to do things in a template based system, and that they also decided to do things in a pseudo-programming manner. Most other CMS systems require you to essentially alter the underlying engine of the system in order to add or replace existing functions–or at the very least write your entire code accessing the database and such as if you were directly adding to the engine. Wordpress does not do this but instead gives you “hooks” which you can call that then add in your data directly to the stream of output.</p>
<p>I quickly found the header hook, “wp_head” and the footer hook, “wp_footer”, but was dismayed that I couldn’t find “wp_body”. This last hook I assumed would exist so that content could be added at the start of the display area of your page–but alas it didn’t and still doesn’t exist. So what could I do to add some custom content at the start of my index or other pages?</p>
<p>after a little investigation I discovered “loop_start”. This tag is a hook to place content at the beginning of the Wordpress post display loop–the loop that displays all of your posts on your index page. It also technically is called to display even one post, so it’s called on your single.php page when you display an archive post page.</p>
<p>So, this should probably do the trick right? Well, yes, it sort of does. But there’s one problem: The loop can happen multiple times on a page in some themes. Yup, you can re-run the loop to do all kinds of stuff; like displaying the most recent series of posts in a sidebar, or showing posts from only a single category beneath your main posts. There are a ton of different ways theme authors have used the loop to do funky things in custom themes.</p>
<p><a href="http://www.awsom.org/using-the-wordpress-loop-to-display-custom-content/" target="_blank">Read More &#8230;</a></p>
<h2>How to add a WordPress Mini-Loop to your static front page.</h2>
<p>When I decided to make Big Square Dot a part static, part dynamic website, I was at a loss as to how I would go about incorporating my latest blog entry into the home page of Big Square Dot. I did not want to install WordPress into the root directory of www.bigsquaredot.com because I am all about organization and don’t much enjoy the sight of ‘wp-’ files littering my domain’s root folder.</p>
<p>What I did want was a simple way to include the date, headline, and excerpt of the latest entry from the Big Square Blog into the Big Square Dot main page, which is mostly static.</p>
<p>Enter Wordpress’ Mini-Loop and a little bit of trial and error.</p>
<p>The Setup</p>
<p>The WordPress Codex currently has a section up on <a href="http://codex.wordpress.org/Creating_a_Static_Front_Page#Adding_a_Mini-Loop" target="_blank">adding a Mini-Loop</a> to a static front page, but for my purposes, it was incomplete. The Mini-Loop tutorial only gives the code markup for how to include headlines of the latest blog posts on a static page, but I needed more, like the post date and the excerpt.</p>
<p>Before WordPress code can be executed on any static page, the following lines of PHP must be included in the header, above the body start tag.</p>
<pre><code>&lt;?php
define('WP_USE_THEMES', false);
require('yoursite/wp-blog-head er.php');
?&gt;</code></pre>
<p><a href="http://bigsquaredot.com/blog/2007/03/04/how-to-add-a-wordpress-mini-loop-to-your-static-front-page" target="_blank">Read More &#8230;</a></p>
<h2>A (Smarter) Solution for Displaying WordPress Entries on ANY Part of Your Website</h2>
<p>I’m going to keep this pretty cut-and-dry. If you guys and gals have any questions, leave your comments and I will see to it that they get answered. Before I start, I would like to reiterate that the following solution should work on any page outside of your WordPress installation directory. The only thing that is involved is PHP/MySQL and your WordPress database. No template tags are needed.</p>
<p>First, we will configure our website database connection, connect to the database, and then select our WordPress database.</p>
<pre><code>&lt;?php
/*Turn off error reporting.*/
error_reporting(0);
//
/*Configure your database connection*/
$dbhost = 'localhost';
$dbuser = 'dbuser';
$dbpass = 'dbpass';
//
/*Connect to the database.*/
$conn = mysql_connect ($dbhost, $dbuser, $dbpass)
or die
('There was an error connecting to the database.');
//
/*Select your WordPress database.*/
$dbname = 'dbname';
mysql_select_db ($dbname);</code></pre>
<p><a href="http://www.bigsquaredot.com/blog/wp-content/uploads/2007/03/display-wordpress-post.txt" target="_blank">Read More &#8230;</a> | <a href="http://www.bigsquaredot.com/blog/wp-content/uploads/2007/03/display-wordpress-post.txt" target="_blank">Download Source Code </a><br />
<h3>Most Commented Posts</h3>
<ul class="related_post">
<li><a href="http://www.themeheven.com/2009/03/display-wordpress-content-outside-of-your-blog/" title="Display Wordpress content outside of your blog">Display Wordpress content outside of your blog</a></li>
<li><a href="http://www.themeheven.com/2009/03/top-10-magazine-wordpress-themes-from-premiumthemes/" title="Top 10 Magazine WordPress Themes from Premiumthemes">Top 10 Magazine WordPress Themes from Premiumthemes</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-meta-tags-plugin/" title="WordPress Meta-Tags Plugin">WordPress Meta-Tags Plugin</a></li>
<li><a href="http://www.themeheven.com/2009/06/simple-jquery-image-slide-show-with-semi-transparent-caption/" title="Simple JQuery Image Slide Show with Semi-Transparent Caption">Simple JQuery Image Slide Show with Semi-Transparent Caption</a></li>
<li><a href="http://www.themeheven.com/2009/06/web-2-0-and-seo/" title="Web 2.0 and SEO">Web 2.0 and SEO</a></li>
<li><a href="http://www.themeheven.com/2009/03/photoshop-tutorial-sites/" title="Photoshop Tutorial Sites">Photoshop Tutorial Sites</a></li>
<li><a href="http://www.themeheven.com/2009/04/how-to-embed-google-ad-in-your-post/" title="How to: Embed Google Ad in your post">How to: Embed Google Ad in your post</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-tips-and-tricks/" title="Wordpress Tips and Tricks">Wordpress Tips and Tricks</a></li>
<li><a href="http://www.themeheven.com/2009/04/digital-photography-tutorial-and-tips/" title="Digital Photography Tutorial and Tips">Digital Photography Tutorial and Tips</a></li>
<li><a href="http://www.themeheven.com/2009/05/useful-wordpress-tricks-to-make-your-theme-even-better/" title="Useful Wordpress Tricks to Make Your Theme Even Better">Useful Wordpress Tricks to Make Your Theme Even Better</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.themeheven.com/2009/04/wordpress-loop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to: Embed Google Ad in your post</title>
		<link>http://www.themeheven.com/2009/04/how-to-embed-google-ad-in-your-post/</link>
		<comments>http://www.themeheven.com/2009/04/how-to-embed-google-ad-in-your-post/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 06:56:37 +0000</pubDate>
		<dc:creator>themeheven</dc:creator>
				<category><![CDATA[HOW TO]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WP Tutorial]]></category>
		<category><![CDATA[Adsense]]></category>

		<guid isPermaLink="false">http://www.themeheven.com/?p=129</guid>
		<description><![CDATA[1. Embed Google Ad in First WordPress Post
The leading SEO (Search Engine Optimization) sites will tell you that placing an ad after the first post in your blog’s home page is particularly effective. This is because the ad is essentially embedded in the blog content, hence your readers are less likely to develop “ad blindness” [...]]]></description>
			<content:encoded><![CDATA[<h3>1. Embed Google Ad in First WordPress Post</h3>
<p>The leading SEO (Search Engine Optimization) sites will tell you that placing an ad after the first post in your blog’s home page is particularly effective. This is because the ad is essentially embedded in the blog content, hence your readers are less likely to develop “ad blindness” and skip over the ad as usual.</p>
<p>To place an ad after the first post in your WordPress blog main page:</p>
<ol>
<li>Open the WordPress admin control panel and navigate to:<br />
Presentation &gt; Theme Editor</li>
<li> Select the Main Index Template from the list of templates on the right.</li>
<li>In the Main Index Template, find the line that starts with: &lt;?php if (have_posts())</li>
<li>Add the following line above it:<br />
&lt;?php $count = 1; ?&gt;</li>
<li>Next, find the line that starts with:<br />
&lt;?php the_content</li>
<li> After the closing tag ?&gt; for that section (it may wrap to multiple lines), add the following code:</li>
<li>&lt;?php if ($count == 1) : ?&gt;<br />
– Insert your Google AdSense code here –<br />
&lt;?php endif; $count++; ?&gt;</li>
<li> Click Update File.</li>
</ol>
<p>This places the ad within the first post. If instead you want the ad to appear between the first and second post, add the code from step 6 after the closing &lt;/div&gt; tag for the “entry” div that contains the line &lt;?php the_content.</p>
<h3>2. How To Display Adsense Search Result Within Wordpress Page</h3>
<p>Google Adsense Search not only offers users site search or the world wide web search, but while brings in web publishers revenue from ads relevant to their search terms.</p>
<p>Initially, the Adsense Search result can only be shown on a google landing page, that is, a new pop up window or on the same window under Google.com domain.</p>
<p>There is third option now which allows you to display search result within your own specified landing page. For example, the search result can now be displayed on a user-defined page (e.g. site-search page on this site), or even the same window where the search form resides. Of course, you would have to be able to create such dedicated search result page yourself.</p>
<p>Next, I will show:</p>
<p>A step by step tutorial on How To Embed Adsense Search Result within WordPress page:</p>
<ol>
<li>First, login to your adsense account and generate Adsense For Search code as usual. When you get to the section “Opening of search results page“, tick the option “Open results within my own site“.</li>
<li> Under “Enter URL where search results will be displayed“, enter the URL where you’d like your search result to be displayed, e.g: http://&lt;YOURDOMAIN&gt;/site-search. (You may change the page “site-search” to other names, but make sure the “Post Slug” (in older version of WordPress) or the “Permalink” for this page is changed accordingly.)</li>
<li>Finish the setup wizard until you reach the final page where two blocks of code (search box code &amp; search results code) are shown.</li>
<li> Open up your WordPress admin portal, and copy the search box code to the place where you would like your search form to be (A good option would be a sidebar widget of “text” type).</li>
<li>Create a new WordPress page (a default template will do). Initial the title as “Site Search” so that the Permalink for this page would probably be http://&lt;YOURDOMAIN&gt;/site-search. If you happen to have the same name in your previous post, you can simply edit it to something else. If you are using older version of WordPres, probably there is a “Post Slug” option on the right column. Set the slug as “site-search” then.</li>
<li>In the content field, paste the search results code onto it.</li>
<li>Save and publish the page. That’s all. Enjoy it!</li>
</ol>
<p>When you test your on-site Google AdSense Search page, you may find the frame in search result page might appear differently or look ugly for some Wordpress theme. This is because Google uses its own style to render those elements. As far as I know, till this end, Google Adsense doesn’t support the customization of the style for Search Result Frame (such as making the background of search result be transparent). But you might be able to change the CSS style to some corresponding HTML tags that are used in Adsense Search Box Code, such as FORM, TABLE, LABEL, INPUT, etc.</p>
<p>There are also many other methods in displaying search result in WordPress Page. A common method among them is to create a new template page, and put the search result code in it. This gives you freedom for controlling (e.g. you may now embed some PHP code in this template), but is not necessary if you want the page to merely display the search result. The page site-search on this site is created based on Default template only.</p>
<h3>3. How to Display Category Specific Content in Wordpress</h3>
<p>One thing I love about Wordpress is the great flexibility it offers in terms of designing custom themes and for this all the credit goes to Wordpress Template Tags.</p>
<p>Recently I ran into a problem where I wanted to monetize the posts in my Gadgets category with TTZmedia ads while keeping the normal Google Adsense ads on all other posts. This is when I found the in_category template function which lets you display category specific content in Wordpress.</p>
<p>The function is simple and very easy to use. Just use it in the Loop on any template file and it should work file.</p>
<pre><code>&lt;?php if ( in_category('category_id') ): ?&gt;// Some category specific PHP/HTML here&lt;?php endif; ?&gt;</code></pre>
<p>More detailed info and examples can be found on the link below:</p>
<p><a href="http://codex.wordpress.org/Template_Tags/in_category" target="_blank">http://codex.wordpress.org/Template_Tags/in_category</a></p>
<p>This can be helpful to monetize posts from certain categories with specific ads and can also be used to display information about a particular category.</p>
<p>A live implementation of this template function can be seen here on Sizlopedia. If you visit any post that belongs to the Gadgets category you will see targeted product ads while in other cases you will see the normal Google Adsense ads.</p>
<h3>4. How To Embed Adsense and YPN Ads Directly Into a Wordpress Blog Post</h3>
<p>Most of us have all heard of Google’s advertising program Google Adsense, and a majority of us already know how to embed the advertisement code they provide into a website. However it becomes difficult when you want to input your Ads directly into your blog post using Wordpress, as the advertisement will move your content to the bottom of the page. When that happens it makes it quite difficult for your readers to see your content and work. Now there is a Wordpress Plugin that can fix all of those Adsense implementation problems along with various other advertising networks.</p>
<p>It’s called the All In One Adsense and YPN(Yahoo Publisher Network) plugin, and what it does is automatically inserts your advertisement into your blog post.</p>
<p><em>All in One Adsense and YPN is a Free and Open Source Wordpress plugin which is able to automatically insert google adsense ads or yahoo publisher network (YPN) ads in to your posts on the fly. It doesn’t matter if you have 1 post or 100,000 posts, it will insert your ad code into all of them automatically. You can control all aspects of your ad’s display and position. Just specify ad color and position in the plugin options, your ad code is automatically generated and inserted. Advanced users can add html and css code before and after the ad to have total control of the ad display.</em></p>
<p>The customizing options of this plugin are countless. There is no manual add implementation required. Some other options that this software allows you to do are:</p>
<ul>
<li>Prevent adds from showing up on certain pages ie: static pages, archive pages etc.</li>
<li> Choose where you want your add to appear in the post. For example: Top right, middle, lower left etc.</li>
<li> Options to randomly place your advertisements within the post.</li>
<li> Choose what shape, color, and seize you would like to make your Google Ad. This is similar to what Google allows you to do using their control panel.</li>
<li> Choose how many adds you want to show on a page or post.</li>
</ul>
<p>The great thing about this plugin is that it’s not only for Adsense. Yes, you Yahoo publishers can use this tool also, in fact, you can use both advertising services if you please.</p>
<p>Setting up the All in One Adsense and YPN Wordpress plugin is fairly simple. First, you go through the usual download, installation, and starting of the plugin. From there on, go into your settings menu and look for the “Adsense” link. There, you will find the “All in One Adsense and YPN” options. Information you’ll have to input into the text fields are simply your publisher ID, along with your Channel ID(optional). Continue on to select the size, shape, and frequency of your advertisements. Once that’s complete you can click save and your advertisements will appear within a short matter of time.</p>
<p>I personally am using All In One Adsense and YPN and haven’t regretted it one bit. This tool allows for easy implementation of ad’s without me having to do much work. I doubt I will ever use the manual Adsense installation ever again. If you have any questions about this great Wordpress plugin feel free to send me an email or comment below. I also have a Twitter account if you have a question you want to send that takes up 140 characters or less.<br />
<h3>See Also Following Topics:</h3>
<ul class="related_post">
<li><a href="http://www.themeheven.com/2009/06/high-paying-google-adsense-keywords/" title="High paying Google Adsense keywords">High paying Google Adsense keywords</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.themeheven.com/2009/04/how-to-embed-google-ad-in-your-post/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wordpress Tips and Tricks</title>
		<link>http://www.themeheven.com/2009/04/wordpress-tips-and-tricks/</link>
		<comments>http://www.themeheven.com/2009/04/wordpress-tips-and-tricks/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 10:46:19 +0000</pubDate>
		<dc:creator>themeheven</dc:creator>
				<category><![CDATA[HOW TO]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WP Tutorial]]></category>
		<category><![CDATA[WP-Hacks]]></category>
		<category><![CDATA[Word Press Tips]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WordPress How-To]]></category>
		<category><![CDATA[WP TIPS Tricks]]></category>

		<guid isPermaLink="false">http://www.themeheven.com/?p=127</guid>
		<description><![CDATA[1. Custom login page
I was actually inspired to write this post because of a 9rules note I started recently. David Airey beat me to the punch with his own version and credit should go to ayushsaran for starting the whole thing but here is mine at last.
This one isn&#8217;t so much a tip or trick [...]]]></description>
			<content:encoded><![CDATA[<h3>1. <a href="http://www.binarymoon.co.uk/2007/07/wordpress-tips-and-tricks-custom-login-page/" target="_blank">Custom login page</a></h3>
<p>I was actually inspired to write this post because of a<a href="http://9rules.com/design/notes/4908/" target="_blank"> 9rules note I started recently</a>. David Airey beat me to the punch with <a href="http://www.davidairey.com/customize-your-WordPress-login/" target="_blank">his own version</a> and credit should go to <a href="http://www.ayushsaran.com/blog/resources/customize-WordPress-login-screen/" target="_blank">ayushsaran</a> for starting the whole thing but here is mine at last.</p>
<p>This one isn&rsquo;t so much a tip or trick as a nicety. It&rsquo;s cool to have the WordPress login page customized to fit your own website branding. This is even more significant for multi author blogs, or sites you have set up for clients as it adds that little extra something.</p>
<p>The process is very simple. Create two images (<a href="http://www.binarymoon.co.uk/wp-admin/images/login-bkg-tile.gif" target="_blank">login-bkg-tile.gif </a>and <a href="http://www.binarymoon.co.uk/wp-admin/images/login-bkg-bottom.gif" target="_blank">login-bkg-bottom.gif</a>) and then stick them in the wp-admin/images/ folder from your WordPress installation. With a bit of effort you can create something nice.</p>
<p><a href="http://www.binarymoon.co.uk/2007/07/wordpress-tips-and-tricks-custom-login-page/" target="_blank">More &raquo;</a></p>
<h3>2. <a href="http://www.optiniche.com/blog/392/multiple-installs-single-database/" target="_blank">WordPress Tutorial: Multiple WordPress Installations Using a Single Database</a></h3>
<p>Sometimes more than one WordPress installation is necessary on a single site and WPMU would be overkill, or sometimes a <a href="http://www.optiniche.com/recommends/hg/" target="_blank">hosting provider</a> limits the number of available databases per account, or maybe you just want to keep things more organized rather than have a bunch of databases scattered everywhere. In any case, you&rsquo;ll want to install multiple instances of WordPress, each one using the same database.</p>
<p>Luckily, this is quite simple to do, but you must install WordPress manually in order for it to work properly. A majority of the one click installations (most common is Fantastico) do not allow you to specify the prefix to use and this is absolutely necessary to be met with success.</p>
<p>During the installation process*, when it comes time to modify your wp-config.php file (or on the WordPress config options screen), make sure that you change the default wp_ prefix to something different.</p>
<p><a href="http://www.optiniche.com/blog/392/multiple-installs-single-database/" target="_blank">More &raquo;</a></p>
<h3>3. <a href="http://karenblundell.com/wordpress-tips-and-tricks" target="_blank">WordPress Permalink Structure</a></h3>
<p>By default WordPress uses URLs containg a question mark and numbers for your permalinks and archives such as &ldquo;http://yourdomain.com?p=123&Prime;. In order to optimize your blog for maximum keyword density, a good idea is to change that setting to a custom permalink structure.</p>
<p>In your WordPress admin area, click &ldquo;Options&rdquo; and then click &ldquo;Permalinks&rdquo;. Select &ldquo;custom&rdquo; in the Customize Permalink Structure area and in the box next to &ldquo;custom&rdquo; enter this: /%category%/%postname%<br />
  This will create URLs for your permalinks and archives that would look like this: http://yourdomain.com/yourcategory/title-of-your-post<br />
  Click &ldquo;Update Permalink Structure&rdquo; to save this setting.</p>
<p><a href="http://karenblundell.com/wordpress-tips-and-tricks" target="_blank">More &raquo;</a></p>
<h3>4. <a href="http://wphacks.com/6-wordpress-tips-and-tricks/" target="_blank">Adding A Side Blog</a></h3>
<ol>
<li>Pick a desired category and add it in your blog (i.e. category &ldquo;Side Blog&rdquo;)</li>
<li> Implement the following code into your &ldquo;Functions.php&rdquo; in your theme&rsquo;s directory:</li>
</ol>
<p>
<pre><code>&lt;?phpfunction asidesFilter($query) {if($query-&gt;is_feed || $query-&gt;is_home || $query-&gt;is_ search) {$query-&gt;set(&rsquo;cat&rsquo;, &lsquo;-115?);}return $query;}&gt;add_filter(&rsquo;pre_get_posts&rsquo;, &lsquo;asidesFilter&rsquo;);&gt;?&gt;</code></pre>
</p>
<p>(Notice the number 115 is the category ID number for the chosen category. Yours will be different.)</p>
<p><a href="http://wphacks.com/6-wordpress-tips-and-tricks/" target="_blank">More &raquo;</a></p>
<h3>5. <a href="http://forthelose.org/15-useful-wordpress-tips-to-make-your-theme-even-better" target="_blank">How to Disable Commenting on Posts Older Than 1 Month</a></h3>
<p>A great way to reduce the amount of spam you receive is to disable the ability to comment on posts that are more than 1 month old. Just paste the following in your functions.php file. Note: To change the amount of time from 1 month, just replace 30 (days) with any number of days you want.</p>
<p>
<pre><code>&lt;?php
  function close_comments( $posts ) {
if ( !is_single() ) { return $posts; }
if ( time() - strtotime( $posts[0]-&gt;post_date_gmt ) &gt; ( 30 * 24 * 60 * 60 ) ) {
$posts[0]-&gt;comment_status = 'closed';
$posts[0]-&gt;ping_status = 'closed';
}
return $posts;
}
add_filter( 'the_posts', 'close_comments' );
?&gt;</code></pre>
</p>
<p><a href="http://forthelose.org/15-useful-wordpress-tips-to-make-your-theme-even-better" target="_blank">More &raquo;</a></p>
<h3>6.  <a href="http://rubiqube.com/wordpress-tutorial-adding-tabs-to-your-blog-sidebar/" target="_blank">Adding Tabs to Your Blog Sidebar</a></h3>
<p>The recent blog redesign gave me a bit of a head ache. In order to implement the tabbed navigation from my sidebar, I had to test a couple of scripts. I know all of them integrate like a charm on other WordPress blogs, but for one reason or another, each time I finished setting up and customizing a certain script, some new weird bug showed up.</p>
<p>The problems were caused by various factors (some of them very weird): having other anchor links (like #comments) in my WordPress theme, a conflict between Prototype framework used by WordPress and jQuery used by a script, etc, etc.</p>
<p>So after testing DomTab, Tabifier and idTabs, I finally managed to get the job done. When all hope was lost, I thought I should give Yahoo! UI Library a shot. They have this really neat component called TabView, which in my case worked like clockwork. On top of that, it&rsquo;s pretty quick and has absolutely no flicker or delay when loading the content. All the other scripts had at least a small delay.</p>
<p>I saw implementations of each of the above mentioned scripts on WordPress and they all have pretty much the same HTML structure. Still, I think the Yahoo! TabView is the best choice.</p>
<p><a href="http://rubiqube.com/wordpress-tutorial-adding-tabs-to-your-blog-sidebar/" target="_blank">More &raquo;</a></p>
<h3>7. <a href="http://wordpress.org/extend/plugins/google-syntax-highlighter/" target="_blank">Google Syntax Highlighter for WordPress</a></h3>
<p>This plugin easily integrates the Google Syntax Highlighter by Alex Gorbatchev into WordPress.
</p>
<p>Feature summary</p>
<ul>
<li>  100% client side, no server dependency</li>
<li>    Multiple languages support</li>
<li> Wide browser support</li>
<li> Very lightweight</li>
</ul>
<p><a href="http://wordpress.org/extend/plugins/google-syntax-highlighter/" target="_blank">More &raquo;</a></p>
<h3>8. <a href="http://www.jagadishwor.com.np/2008/08/installing-wordpress-in-your-computer/" target="_blank">Installing Xampp and WordPress</a></h3>
<p>WordPress is a popular CMS system which is very popular now. I found there is lots of people still trying to use wordprss however they don&rsquo;t know how to work on a local computer. Here I am trying to show you how to setup WordPress in your local computer so that you will save your time from updating and previewing files (so, you don&rsquo;t have to frequently upload files on every change). You can also use the local version to test new plugins, themes, and upgrades. This tutorial is intended for beginners who want to learn how to run WordPress locally.</p>
<p>Before you start, let&rsquo;s look at the requirements to run WordPress:</p>
<p>PHP 4.3+</p>
<p>MySQL 4+ Database Server</p>
<p><a href="http://www.jagadishwor.com.np/2008/08/installing-wordpress-in-your-computer/" target="_blank">More &raquo;</a></p>
<h3>9. <a href="http://wpcandy.com/articles/tutorials/4-simple-ways-to-speed-up-wordpress.html" target="_blank">4 Simple Ways To Speed Up WordPress</a></h3>
<p>Some self-hosted WordPress sites tend to run slow, especially when you receive tons of heavy traffic every day. This may be a result of the amount of large files your site needs to load or inefficient coding. But there&rsquo;s nothing worst than a slow site, so here are some quick tips on how to speed up your self-hosted WordPress site. These tips mostly apply to self-hosted WordPress site because if you&rsquo;re site is hosted on WordPress.com, you&rsquo;re already being taken care of.
</p>
<p>1. Staying up to date with releases</p>
<p>Staying up to date with the latest version of WordPress is critical. In every update, there are usually a lot of performance enhancements. The developers at WordPress don&rsquo;t release updates just for fun, but because they&rsquo;ve upgrades or made something about WordPress better.</p>
<p>Same situation with WordPress plugins, stay up to date with the latest versions. It&rsquo;s as important, and for the same reasons. WordPress plugin developers release new versions because they&rsquo;ve modified the code in some way to make the plugin better. So keep up with the releases!</p>
<p><a href="http://wpcandy.com/articles/tutorials/4-simple-ways-to-speed-up-wordpress.html" target="_blank">More &raquo;</a></p>
<h3>10. <a href="http://www.village-idiot.org/archives/2007/05/22/wp-emergency-password-recovery/" target="_blank">Reset Your Lost WordPress Administrator Password</a></h3>
<p>For some reason, people have trouble with this, I don&#8217;t know why &#8211; I never have.</p>
<p>They either don&#8217;t get the e-mails, or the password doesn&#8217;t seem to reset, or it resets and because they don&#8217;t get the e-mail they can&#8217;t get the activation link, or they don&#8217;t have access to the database, or so on and so on and so on.</p>
<p>Tired of all of those posts I decided there had to be a simpler way. Enter this totally insecure script, emergency.php</p>
<p>emergency.php does 2 things: It allows you to change your WordPress blog administrator password and it sends off an e-mail to the blog administrator, letting them know, once it&#8217;s been changed, what&#8217;s happened.</p>
<p>It does not require that you be logged in. It only requires that you have the ability to upload the file to your server, and that you know the current WordPress administrator&#8217;s username. Hint: That&#8217;s usually admin.</p>
<p><a href="http://www.village-idiot.org/archives/2007/05/22/wp-emergency-password-recovery/" target="_blank">More &raquo;<br />
</a></p>
<h3>11. <a href="http://paulstamatiou.com/2007/06/03/how-to-twitter-bar-popular-posts-random-stats" target="_blank">How To: Twitter Bar, Popular Posts, Random Stats</a></h3>
<p>Every week I receive more than a handful of emails from people asking me what I use to display my Twitter status on this blog, as well as how I do the &ldquo;popular this month&rdquo; block and display random blog stats in my sidebar. Hopefully this post will answer those questions.</p>
<p>Twitter Status<br />
Popular Posts This Month<br />
Random Stats</p>
<p><a href="http://paulstamatiou.com/2007/06/03/how-to-twitter-bar-popular-posts-random-stats" target="_blank">More &raquo;<br />
</a></p>
<h3>12. <a href="http://wordpress.org/extend/plugins/wp-super-cache/" target="_blank">WP Super Cache</a></h3>
<p>This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.</p>
<p><a href="http://wordpress.org/extend/plugins/wp-super-cache/" target="_blank">More &raquo; </a></p>
<h3>13. <a href="http://themeshaper.com/how-to-add-gravatars-for-the-post-author-in-wordpress/" target="_blank">How To Add Gravatars For The Post Author in WordPress</a></h3>
<p>Now that Gravatar support is part of the WordPress core adding them into your WordPress theme is easy. Adding them to your comments has been documented. How about adding them to your post titles to highlight the comment author? Within the loop? That&rsquo;s fairly easy too. Here&rsquo;s the code:</p>
<p>
<pre><code>&lt;?php echo get_avatar( get_the_author_email(), '80' ); ?&gt;</code></pre>
</p>
<p>Pretty simple, huh? get_the_author_email outputs the post author&rsquo;s email and the &ldquo;80&rdquo; is the size of the avatar image in pixels (you can change that). How this will look depends on how you use it; where you put it in the theme (it has to be in the loop!) and how you style it.</p>
<p><a href="http://themeshaper.com/how-to-add-gravatars-for-the-post-author-in-wordpress/" target="_blank">More &raquo;<br />
</a></p>
<h3>14. <a href="http://www.mattcutts.com/blog/highlight-author-comments-wordpress/" target="_blank">How to highlight author comments in WordPress</a></h3>
<p>A while ago I was looking around for how to make my own comments a different color on my blog. Most of the advice was along the lines of &ldquo;Add code to check if the commenter&rsquo;s email is the same as the email address of the blog&rsquo;s author.&rdquo; Can you spot the flaw in that logic? If a commenter knows the email address of the blog author, she could use the blog owner&rsquo;s email address in her comment and get her own comment highlighted. Worse yet, someone could try to discover the blog owner&rsquo;s email address by trying lots of email addresses until they saw their comments change to a different color.</p>
<p>So I dug a little deeper and found a good answer on this support thread. The trick is simple: instead of checking the author&rsquo;s email address, check their user id to see if it&rsquo;s the user id of the blog owner. Pretty smart. </p>
<p><a href="http://www.mattcutts.com/blog/highlight-author-comments-wordpress/" target="_blank">More &raquo;</a></p>
<h3>15. <a href="http://weblogtoolscollection.com/archives/2008/05/17/how-to-avoid-duplicate-posts/" target="_blank">How To: Avoid Duplicate Posts</a></h3>
<p>The Codex article the reader mentioned was regarding the Loop. Although the example shows how to avoid a single duplicate post, it doesn&rsquo;t show how to avoid duplicating multiple posts.</p>
<p>Here&rsquo;s how to show two individual loops without duplicating posts in either loop.</p>
<p><a href="http://weblogtoolscollection.com/archives/2008/05/17/how-to-avoid-duplicate-posts/" target="_blank">More &raquo;</a></p>
<h3>16. <a href="http://www.hongkiat.com/blog/how-to-display-feedburner-subscriber-count-in-text/" target="_blank">How To Display Feedburner Subscriber Count In Text</a></h3>
<p>I believe you&rsquo;ve seen websites and blogs that uses the text-based Feedburner subscriber count instead of the chicklet. I hope you are not getting the idea the these guys update their feed count manually. Instead, it can be done easily with scripts, and the reason why you want to do is &#8211; it gives you total flexibility in terms of design, styling and display.</p>
<p><a href="http://www.hongkiat.com/blog/how-to-display-feedburner-subscriber-count-in-text/" target="_blank">More &raquo;</a></p>
<p>&nbsp;</p>
<h3>17. <a href="http://wphacks.com/how-to-converting-your-category-pages-to-display-post-titles/" target="_blank">How To: Converting Your Category Pages to Display Post Titles</a></h3>
<p>Many WordPress themes are setup to display their category pages in the same format as your blog&rsquo;s homepage, making your categories useless to some. This can cause duplicate content problems, as well as making your categories difficult to avoid. If this isn&rsquo;t the case for you, then your theme is probably instead setup to just display a post excerpt for each post on your category page. I&rsquo;ve never been a fan of this either, as this format strips your post of links/styles and doesn&rsquo;t give you control over how much of the post to display.</p>
<p>Instead, I&rsquo;ve always liked the idea of showing only the post titles on your category pages. If you are good at making post titles, this should help someone navigating your categories to find what they are looking for.</p>
<p><a href="http://wphacks.com/how-to-converting-your-category-pages-to-display-post-titles/" target="_blank">More &raquo;</a></p>
<h3>18. <a href="http://www.wpdesigner.com/2007/06/12/styling-individual-posts-using-the_id/" target="_blank">Styling Individual Posts Using the_ID</a></h3>
<p>How many times have you typed up a post and published it, only to wish that you could style that post just a little differently than the others. One example might be a special announcement post that maybe you wanted to highlight with a unique background color. Well we are going to take a look at one method of doing this in Wordpress.</p>
<p>Before we get started on the details I&rsquo;d like to direct you to a short read in the Wordpress documentation on the</p>
<p><a href="http://www.wpdesigner.com/2007/06/12/styling-individual-posts-using-the_id/" target="_blank">More &raquo;</a></p>
<h3>19.<br />
<a href="http://karenblundell.com/wordpress-tips-and-tricks" target="_blank">See How Easily You Can Increase Your Comment Conversation</a></h3>
<p>If you could install one plugin and it would help to increase the conversation in your comments, would you do it?</p>
<p>To me, the hardest thing about keeping up with comment conversation is knowing that something new has been posted. With some blogs, you are able to subscribe to an RSS feed of comments&ndash; so I could track it with Bloglines, but that requires me to find the right feed name, put in a place for it, and not everyone has a nice feed reader.
</p>
<p>Enter the &ldquo;<a href="http://txfx.net/code/wordpress/subscribe-to-comments/" target="_blank">Subscribe to Comments</a>&rdquo; plugin for WordPress. You&rsquo;ve probably seen the little box following the comment box that sends you an e-mail every time there&rsquo;s a new comment. Well, there&rsquo;s a lot of goodness behind that little plugin.</p>
<p><a href="http://karenblundell.com/wordpress-tips-and-tricks" target="_blank">More &raquo;</a></p>
<h3>20.<a href="http://www.optiniche.com/blog/430/add-subscription-options/" target="_blank"> Improve Your Blog by Offering More Subscription Options</a></h3>
<p>Sometimes giving someone more choices can make one&rsquo;s life a little more difficult since, by nature, people can become overwhelmed with too many options. However, one area where you want to offer more choices is with how people can receive the content from your blog.</p>
<p>The most common option available to bloggers is the main RSS feed. It allows someone to subscribe to all of the blog&rsquo;s content via an RSS reader. Great option, but sometimes people don&rsquo;t want to subscribe to all the blog&rsquo;s content and would only like to get updates when a specific section is updated. </p>
<p>Using WordPress, it&rsquo;s simple to give readers an option of subscribing only to a specific category, or even a specific tag by appending the URL with a feed indicator. The indicator will depend on whether you have set up permalinks or not. If you&rsquo;ve set up permalinks, then all someone needs to add is add /feed/ to the end of the category or tag URL to get its feed. If you haven&rsquo;t set up permalinks, then someone needs to add &amp;feed=rss2 to the category or tag URL. See the following examples:</p>
<p>Permalinks: http://www.yourblog.com/tag/sky/feed/ <br />
  Default: http://www.yourblog.com/?cat=2&amp;feed=rss2</p>
<p>In fact, just about anything on WordPress can be turned into a feed by appending the feed indicator to the URL. If you were to append it to your search results, you&rsquo;d get the search results feed. If you were to add it to an entry&rsquo;s permalink, you&rsquo;d get the comments feed for that specific entry. </p>
<p><a href="http://www.optiniche.com/blog/430/add-subscription-options/" target="_blank">More &raquo;</a></p>
<h3>See Also Following Topics:</h3>
<ul class="related_post">
<li><a href="http://www.themeheven.com/2009/05/useful-wordpress-tricks-to-make-your-theme-even-better/" title="Useful Wordpress Tricks to Make Your Theme Even Better">Useful Wordpress Tricks to Make Your Theme Even Better</a></li>
<li><a href="http://www.themeheven.com/2009/05/wordpress-highlight-admin-comments/" title="WordPress highlight author comments">WordPress highlight author comments</a></li>
<li><a href="http://www.themeheven.com/2009/04/how-toshowing-subcategories-on-wordpress-category-pages/" title="How to: Showing subcategories on WordPress category pages">How to: Showing subcategories on WordPress category pages</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-tip-the-easy-way-to-show-a-popular-post-list/" title="Wordpress Tip: The Easy Way to Show a Popular Post List">Wordpress Tip: The Easy Way to Show a Popular Post List</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-display-category-in-menu/" title="WordPress Display Category in Menu">WordPress Display Category in Menu</a></li>
<li><a href="http://www.themeheven.com/2009/03/display-wordpress-content-outside-of-your-blog/" title="Display Wordpress content outside of your blog">Display Wordpress content outside of your blog</a></li>
<li><a href="http://www.themeheven.com/2009/03/wordpress-hack-creating-a-two-tiered-navigation-menu/" title="WordPress Hack: Creating a Two-Tiered Navigation Menu">WordPress Hack: Creating a Two-Tiered Navigation Menu</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.themeheven.com/2009/04/wordpress-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress Display Category in Menu</title>
		<link>http://www.themeheven.com/2009/04/wordpress-display-category-in-menu/</link>
		<comments>http://www.themeheven.com/2009/04/wordpress-display-category-in-menu/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 09:25:05 +0000</pubDate>
		<dc:creator>themeheven</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WP Tutorial]]></category>
		<category><![CDATA[WP-Hacks]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.themeheven.com/?p=124</guid>
		<description><![CDATA[1. Displaying WordPress categories in a horizontal dropdown menu.
One of my readers recently asked how I created my horizontal menu bar: the short answer is by mixing CSS and Javascript.
The first step is to get WordPress to display the menu as a hierarchical list without a title.
&#60;?php wp_list_categories('sort_column=name&#38;sort_order=asc&#38;style=list&#38;children=true&#38;hierarchical=true&#38;title_li=0'); ?&#62;
We then wrap this WordPress code in [...]]]></description>
			<content:encoded><![CDATA[<h3>1. <a href="http://anthologyoi.com/wordpress/displaying-wordpress-categories-in-a-horizontal-dropdown-menu.html" target="_blank">Displaying WordPress categories in a horizontal dropdown menu.</a></h3>
<p>One of my readers recently asked how I created my horizontal menu bar: the short answer is by mixing CSS and Javascript.</p>
<p>The first step is to get WordPress to display the menu as a hierarchical list without a title.</p>
<pre><code>&lt;?php wp_list_categories('sort_column=name&amp;sort_order=asc&amp;style=list&amp;children=true&amp;hierarchical=true&amp;title_li=0'); ?&gt;</code></pre>
<p>We then wrap this WordPress code in the following so we can style it.</p>
<pre><code>&lt;div style="text-align:center;"&gt;
    &lt;ul id="menu" style="padding:0; margin:0;"&gt;
        &lt;?php wp_list_categories('sort_column=name&amp;sort_order=asc&amp;style=list&amp;children=true&amp;hierarchical=true&amp;title_li=0'); ?&gt;
    &lt;/ul&gt;
&lt;/div&gt;</code></pre>
<p>I added this to my header.php, but you can add it anywhere you want it to appear.</p>
<p>The CSS is fairly simple and you just need to add it to your theme’s style.css file.</p>
<pre><code>ul#menu {
	margin: 0;
	padding: 0;
	list-style: none;
	width: 100%;
	font-size:1.2em;
}
ul#menu li {

  float: left;

  padding: 0;

  margin: 0;

  border-right:solid 1px #fff;

  }

ul#menu ul li {

  float: none;

  position: relative;

  border-bottom: 1px solid #7EAED7; /* fixes gap problem in IE */

  border-left: 1px solid #FFF;

  z-index:1000;

  }

ul#menu li ul {

  margin: 0;

  padding: 0;

  display:none;

  list-style: none;

  position: absolute;

  background: #9CC;

  }

  ul#menu ul ul{

  margin-left: .2em;

  position: absolute;

  top: 0; /* if using borders, -1px to align top borders */

  left: 100%;

  }

ul#menu * a:hover, ul#menu li a:active{

  background:#7EAED7 !important;

  color: #FFFFFF;

  }

ul#menu li a:link,

  ul#menu li a:visited,

  ul#menu li a:hover,

  ul#menu li a:active{

  display: block;

  padding: .2em .3em;

  text-decoration: none;

  background: #5587B3;

  color: #FFFFFF;

  }

ul#menu ul li a:link,

  ul#menu ul li a:visited,

  ul#menu ul li a:hover,

  ul#menu ul li a:active {

  width: 8em;

  }

</code></pre>
<p><a href="http://anthologyoi.com/wordpress/displaying-wordpress-categories-in-a-horizontal-dropdown-menu.html"></p>
<p></a></p>
<p><a href="http://anthologyoi.com/wordpress/displaying-wordpress-categories-in-a-horizontal-dropdown-menu.html" target="_blank">More »</a></p>
<h3>2. <a href="http://www.webdesignerwall.com/tutorials/wordpress-theme-hacks/" target="_blank">Dynamic Highlight Menu</a></h3>
<p>Here is what I used to create a dynamic highlight menu on <a href="http://bestwebgallery.com/" target="_blank">Best Web Gallery</a>. In the first list item, if it is Home or Category or Archive or Search or Single, add class=&#8221;current&#8221; to the &lt;li&gt; tag, which will highlight the &#8220;Gallery&#8221; button. Second item, if it is page with Page Slug &#8220;about&#8221;, add class=&#8221;current&#8221;.</p>
<pre><code>&lt;ul id="nav"&gt;
  &lt;li&lt;?php if ( is_home() || is_category() || is_archive() || is_search() || is_single() || is_date() ) { echo ' class="current"'; } ?&gt;&gt;&lt;a href="#"&gt;Gallery&lt;/a&gt;&lt;/li&gt;
  &lt;li&lt;?php if ( is_page('about') ) { echo ' class="current"'; } ?&gt;&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt;
  &lt;li&lt;?php if ( is_page('submit') ) { echo ' class="current"'; } ?&gt;&gt;&lt;a href="#"&gt;Submit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p>Dynamic Title tag</p>
<pre><code>&lt;title&gt;
&lt;?php
if (is_home()) {
	echo bloginfo('name');
} elseif (is_404()) {
	echo '404 Not Found';
} elseif (is_category()) {
	echo 'Category:'; wp_title('');
} elseif (is_search()) {
	echo 'Search Results';
} elseif ( is_day() || is_month() || is_year() ) {
	echo 'Archives:'; wp_title('');
} else {
	echo wp_title('');
}
?&gt;
&lt;/title&gt;</code></pre>
<p><a href="http://www.webdesignerwall.com/tutorials/wordpress-theme-hacks/" target="_blank">More »</a></p>
<h3>3. <a href="http://www.tech-evangelist.com/2009/02/17/modify-wordpress-categories/" target="_blank">How to Modify WordPress Category and Menu Behaviors</a></h3>
<p>Did you know that you can change the sort order of posts and categories listed in menu items with WordPress, and can even eliminate some items that you might not want to display? WordPress uses built-in PHP functions and the output is easily modified without the need to alter the code in the functions themselves.</p>
<p>There is a good reason for not altering the code in the core WordPress scripts unless it is absolutely necessary to do so. Most PHP functions are part of the core code, and if you change the code in these scripts, you will lose your changes the next time you upgrade WordPress.</p>
<p>WordPress developers have set up the system so that you can alter the behavior of several PHP core functions by inserting arguments sent with the call to the function from the theme template scripts. Arguments are name-value pairs, which are sometimes called parameters. You must use a valid name for an argument and assign a valid value in order for a change to work.</p>
<p>There are two functions to look for in your WordPress theme. In most themes, you will find the calls to the menu listings for pages and categories in the sidebar.php script. Sometimes, a designer will place the call to the pages function in the header.php or footer.php script. If you are using sidebar widgets, this information does not apply, because widget code calls to the functions will be found in other scripts.</p>
<p><a href="http://www.tech-evangelist.com/2009/02/17/modify-wordpress-categories/" target="_blank">More »</a></p>
<h3>4. <a href="http://webmasters-blog.com/howto-create-magazine-style-horizontal-drop-down-menu-for-wordpress-categories-pages/" target="_blank">Create horizontal drop-down menu for Wordpress Categories/Pages</a></h3>
<p>Wordpress theme’s trends changes every few months. So you get to see new styles for Wordpress every 6-8 months. These days there is a trend of displaying your categories and subcategories or pages and subpages in a drop-down horizontal menu in header.</p>
<p>Though many wordpress themes come with built-in simple horizontal menu, i.e. there is no drop-down facility, you can easily put advanced categories/pages menu in your header.</p>
<p>Just follow these simple steps, and you will have a horizontal drop-down menu in your blog’s header.</p>
<pre><code>&lt;ul id=”nav2″ class=”clearfloat”&gt;
&lt;li&gt;&lt;a href=”&lt;?php echo get_option(’home’); ?&gt;/” class=”on”&gt;Home&lt;/a&gt;&lt;/li&gt;

&lt;?php wp_list_categories(’orderby=name&amp;exlude=181&amp;title_li=’);

  $this_category = get_category($cat);

  if (get_category_children($this_category-&gt;cat_ID) != “”) {

  echo “&lt;ul&gt;”;

  wp_list_categories(’orderby=id&amp;show_count=0&amp;title_li=&amp;use_desc_for_title=1&amp;child_of=’.$this_category-&gt;cat_ID);

  echo “&lt;/ul&gt;”;

  }

  ?&gt;

&lt;/ul&gt;</code></pre>
<p><a href="http://webmasters-blog.com/howto-create-magazine-style-horizontal-drop-down-menu-for-wordpress-categories-pages/"></p>
<p></a></p>
<p><a href="http://webmasters-blog.com/howto-create-magazine-style-horizontal-drop-down-menu-for-wordpress-categories-pages/" target="_blank">More »</a><br />
<h3>See Also Following Topics:</h3>
<ul class="related_post">
<li><a href="http://www.themeheven.com/2009/05/useful-wordpress-tricks-to-make-your-theme-even-better/" title="Useful Wordpress Tricks to Make Your Theme Even Better">Useful Wordpress Tricks to Make Your Theme Even Better</a></li>
<li><a href="http://www.themeheven.com/2009/05/wordpress-highlight-admin-comments/" title="WordPress highlight author comments">WordPress highlight author comments</a></li>
<li><a href="http://www.themeheven.com/2009/04/how-toshowing-subcategories-on-wordpress-category-pages/" title="How to: Showing subcategories on WordPress category pages">How to: Showing subcategories on WordPress category pages</a></li>
<li><a href="http://www.themeheven.com/2009/04/wordpress-tips-and-tricks/" title="Wordpress Tips and Tricks">Wordpress Tips and Tricks</a></li>
<li><a href="http://www.themeheven.com/2009/03/display-wordpress-content-outside-of-your-blog/" title="Display Wordpress content outside of your blog">Display Wordpress content outside of your blog</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.themeheven.com/2009/04/wordpress-display-category-in-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
